summaryrefslogtreecommitdiff
path: root/builtin/mv.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-05-30 14:04:05 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-05-30 14:04:05 +0900
commit2f76ebc93ca6bfc2aba1be330aabe391a7d093d2 (patch)
tree2aba711da4a334aeaa374345e1714973d1e92315 /builtin/mv.c
parentMerge branch 'sg/t6500-no-redirect-of-stdin' (diff)
parentlock_file: move static locks into functions (diff)
downloadtgif-2f76ebc93ca6bfc2aba1be330aabe391a7d093d2.tar.xz
Merge branch 'ma/lockfile-cleanup'
Code clean-up to adjust to a more recent lockfile API convention that allows lockfile instances kept on the stack. * ma/lockfile-cleanup: lock_file: move static locks into functions lock_file: make function-local locks non-static refs.c: do not die if locking fails in `delete_pseudoref()` refs.c: do not die if locking fails in `write_pseudoref()` t/helper/test-write-cache: clean up lock-handling
Diffstat (limited to 'builtin/mv.c')
-rw-r--r--builtin/mv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/mv.c b/builtin/mv.c
index 7a63667d64..80bb967a63 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -72,7 +72,6 @@ static const char *add_slash(const char *path)
return path;
}
-static struct lock_file lock_file;
#define SUBMODULE_WITH_GITDIR ((const char *)1)
static void prepare_move_submodule(const char *src, int first,
@@ -131,6 +130,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
enum update_mode { BOTH = 0, WORKING_DIRECTORY, INDEX } *modes;
struct stat st;
struct string_list src_for_dst = STRING_LIST_INIT_NODUP;
+ struct lock_file lock_file = LOCK_INIT;
git_config(git_default_config, NULL);