cocci: apply "pending" index-compatibility to "t/helper/*.c"

Apply the "index-compatibility.pending.cocci" rule to the "t/helper/*"
directory, a subsequent commit will extend cache.h to further narrow
down the use of "USE_THE_INDEX_COMPATIBILITY_MACROS" in this area.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ævar Arnfjörð Bjarmason
2022-11-19 14:07:35 +01:00
committed by Junio C Hamano
parent dc594180d9
commit 0ea414a14d
8 changed files with 21 additions and 20 deletions

View File

@ -20,7 +20,7 @@ int cmd__read_cache(int argc, const char **argv)
git_config(git_default_config, NULL);
for (i = 0; i < cnt; i++) {
read_cache();
repo_read_index(the_repository);
if (name) {
int pos;
@ -33,7 +33,7 @@ int cmd__read_cache(int argc, const char **argv)
ce_uptodate(the_index.cache[pos]) ? "" : " not");
write_file(name, "%d\n", i);
}
discard_cache();
discard_index(&the_index);
}
return 0;
}