am: avoid directory rename detection when calling recursive merge machinery
[gitweb.git] / builtin / add.c
index c9e2619a9ad8febc10e4132c88e7a74c6c9bbeaf..8a155dd41eccd8004a55b1302111293ae59ea542 100644 (file)
@@ -265,8 +265,6 @@ static int edit_patch(int argc, const char **argv, const char *prefix)
        return 0;
 }
 
-static struct lock_file lock_file;
-
 static const char ignore_error[] =
 N_("The following paths are ignored by one of your .gitignore files:\n");
 
@@ -393,6 +391,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
        int add_new_files;
        int require_pathspec;
        char *seen = NULL;
+       struct lock_file lock_file = LOCK_INIT;
 
        git_config(add_config, NULL);