t7501: add test of "commit --dry-run --short"
[gitweb.git] / t / helper / test-scrap-cache-tree.c
index d26d3e7c8b1a407e2cf40ce20750495f500d5170..393f1604ff954703a2a5e075fbda1e14d0827dc0 100644 (file)
@@ -4,10 +4,10 @@
 #include "tree.h"
 #include "cache-tree.h"
 
-static struct lock_file index_lock;
-
 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)