Merge branch 'as/safecrlf-quiet-fix'
[gitweb.git] / builtin / read-tree.c
index d5f618d086365520fcf36ed8db110ba701ba37d3..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>"),
@@ -164,8 +163,6 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)
        argc = parse_options(argc, argv, unused_prefix, read_tree_options,
                             read_tree_usage, 0);
 
-       load_submodule_cache();
-
        hold_locked_index(&lock_file, LOCK_DIE_ON_ERROR);
 
        prefix_set = opts.prefix ? 1 : 0;