Merge branch 'ab/get-short-oid'
[gitweb.git] / builtin / read-tree.c
index bf87a2710b31fa49b1802ed297c8ae52eede6354..ebc43eb8057dc9c85aad4c608250ed9a6c4d6cd1 100644 (file)
@@ -107,8 +107,6 @@ static int git_read_tree_config(const char *var, const char *value, void *cb)
        return git_default_config(var, value, cb);
 }
 
-static struct lock_file lock_file;
-
 int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)
 {
        int i, stage = 0;
@@ -116,6 +114,7 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)
        struct tree_desc t[MAX_UNPACK_TREES];
        struct unpack_trees_options opts;
        int prefix_set = 0;
+       struct lock_file lock_file = LOCK_INIT;
        const struct option read_tree_options[] = {
                { OPTION_CALLBACK, 0, "index-output", NULL, N_("file"),
                  N_("write resulting index to <file>"),