summaryrefslogtreecommitdiff
path: root/t/helper/test-dump-cache-tree.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-04-18 14:14:09 +0200
committerJunio C Hamano <gitster@pobox.com>2024-04-18 12:30:41 -0700
commit319ba144076c27f3451bb73834839e9441a9c180 (patch)
tree8aac610d2f6410eba667b54f0574ceec6bd6de87 /t/helper/test-dump-cache-tree.c
parent21306a098c3f174ad4c2a5cddb9069ee27a548b0 (diff)
t/helper: stop using `the_index`
Convert test-helper tools to use `the_repository->index` instead of `the_index`. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper/test-dump-cache-tree.c')
-rw-r--r--t/helper/test-dump-cache-tree.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/t/helper/test-dump-cache-tree.c b/t/helper/test-dump-cache-tree.c
index c38f546e4f..02b0b46c3f 100644
--- a/t/helper/test-dump-cache-tree.c
+++ b/t/helper/test-dump-cache-tree.c
@@ -1,4 +1,3 @@
-#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
#include "hash.h"
#include "hex.h"
@@ -68,10 +67,10 @@ int cmd__dump_cache_tree(int ac UNUSED, const char **av UNUSED)
setup_git_directory();
if (repo_read_index(the_repository) < 0)
die("unable to read index file");
- istate = the_index;
+ istate = *the_repository->index;
istate.cache_tree = another;
cache_tree_update(&istate, WRITE_TREE_DRY_RUN);
- ret = dump_cache_tree(the_index.cache_tree, another, "");
+ ret = dump_cache_tree(the_repository->index->cache_tree, another, "");
cache_tree_free(&another);
return ret;