summaryrefslogtreecommitdiff
path: root/t/helper/test-read-cache.c
diff options
context:
space:
mode:
Diffstat (limited to 't/helper/test-read-cache.c')
-rw-r--r--t/helper/test-read-cache.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/t/helper/test-read-cache.c b/t/helper/test-read-cache.c
index b736ef1..1acd362 100644
--- a/t/helper/test-read-cache.c
+++ b/t/helper/test-read-cache.c
@@ -1,6 +1,9 @@
+#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
-#include "cache.h"
#include "config.h"
+#include "read-cache-ll.h"
+#include "repository.h"
+#include "setup.h"
int cmd__read_cache(int argc, const char **argv)
{
@@ -20,7 +23,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 +36,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;
}