shallow: migrate shallow information into the object parser
[gitweb.git] / t / helper / test-scrap-cache-tree.c
index 27fe0405b887671ff0ca4cea1b258aa850e66c8c..d26d3e7c8b1a407e2cf40ce20750495f500d5170 100644 (file)
@@ -1,3 +1,4 @@
+#include "test-tool.h"
 #include "cache.h"
 #include "lockfile.h"
 #include "tree.h"
@@ -5,10 +6,10 @@
 
 static struct lock_file index_lock;
 
-int cmd_main(int ac, const char **av)
+int cmd__scrap_cache_tree(int ac, const char **av)
 {
        setup_git_directory();
-       hold_locked_index(&index_lock, 1);
+       hold_locked_index(&index_lock, LOCK_DIE_ON_ERROR);
        if (read_cache() < 0)
                die("unable to read index file");
        active_cache_tree = NULL;