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:

committed by
Junio C Hamano

parent
dc594180d9
commit
0ea414a14d
@ -9,9 +9,10 @@ int cmd__write_cache(int argc, const char **argv)
|
||||
if (argc == 2)
|
||||
cnt = strtol(argv[1], NULL, 0);
|
||||
setup_git_directory();
|
||||
read_cache();
|
||||
repo_read_index(the_repository);
|
||||
for (i = 0; i < cnt; i++) {
|
||||
hold_locked_index(&index_lock, LOCK_DIE_ON_ERROR);
|
||||
repo_hold_locked_index(the_repository, &index_lock,
|
||||
LOCK_DIE_ON_ERROR);
|
||||
if (write_locked_index(&the_index, &index_lock, COMMIT_LOCK))
|
||||
die("unable to write index file");
|
||||
}
|
||||
|
Reference in New Issue
Block a user