summaryrefslogtreecommitdiff
path: root/t/helper/test-scrap-cache-tree.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-11-19 14:07:35 +0100
committerJunio C Hamano <gitster@pobox.com>2022-11-21 12:06:15 +0900
commit0ea414a14dac444c52f45d4d15c0f5318dddc4b1 (patch)
tree0811e9b62a34ece1f8754f8e010378ca7f908763 /t/helper/test-scrap-cache-tree.c
parentdc594180d9e62438cb664c678f5e5bd229154c75 (diff)
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>
Diffstat (limited to 't/helper/test-scrap-cache-tree.c')
-rw-r--r--t/helper/test-scrap-cache-tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/helper/test-scrap-cache-tree.c b/t/helper/test-scrap-cache-tree.c
index 20e2e31f9e..9206dee1fd 100644
--- a/t/helper/test-scrap-cache-tree.c
+++ b/t/helper/test-scrap-cache-tree.c
@@ -9,8 +9,8 @@ int cmd__scrap_cache_tree(int ac, const char **av)
struct lock_file index_lock = LOCK_INIT;
setup_git_directory();
- hold_locked_index(&index_lock, LOCK_DIE_ON_ERROR);
- if (read_cache() < 0)
+ repo_hold_locked_index(the_repository, &index_lock, LOCK_DIE_ON_ERROR);
+ if (repo_read_index(the_repository) < 0)
die("unable to read index file");
cache_tree_free(&the_index.cache_tree);
the_index.cache_tree = NULL;