summaryrefslogtreecommitdiffstats
path: root/t/helper/test-scrap-cache-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 't/helper/test-scrap-cache-tree.c')
-rw-r--r--t/helper/test-scrap-cache-tree.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/helper/test-scrap-cache-tree.c b/t/helper/test-scrap-cache-tree.c
index 6efee31a48..d2a63bea43 100644
--- a/t/helper/test-scrap-cache-tree.c
+++ b/t/helper/test-scrap-cache-tree.c
@@ -5,9 +5,10 @@
static struct lock_file index_lock;
-int main(int ac, char **av)
+int cmd_main(int ac, const char **av)
{
- hold_locked_index(&index_lock, 1);
+ setup_git_directory();
+ hold_locked_index(&index_lock, LOCK_DIE_ON_ERROR);
if (read_cache() < 0)
die("unable to read index file");
active_cache_tree = NULL;