From 0ea414a14dac444c52f45d4d15c0f5318dddc4b1 Mon Sep 17 00:00:00 2001 From: Ævar Arnfjörð Bjarmason Date: Sat, 19 Nov 2022 14:07:35 +0100 Subject: cocci: apply "pending" index-compatibility to "t/helper/*.c" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- t/helper/test-write-cache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 't/helper/test-write-cache.c') diff --git a/t/helper/test-write-cache.c b/t/helper/test-write-cache.c index 8837717d36..66287d6d47 100644 --- a/t/helper/test-write-cache.c +++ b/t/helper/test-write-cache.c @@ -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"); } -- cgit 1.2.3-korg