diff options
| author | Junio C Hamano <gitster@pobox.com> | 2018-05-30 14:04:05 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2018-05-30 14:04:05 +0900 |
| commit | 2f76ebc93ca6bfc2aba1be330aabe391a7d093d2 (patch) | |
| tree | 2aba711da4a334aeaa374345e1714973d1e92315 /builtin/read-tree.c | |
| parent | 0e7af5f6d16a4cef7d981ac9631f35d146904eca (diff) | |
| parent | 0fa5a2ed8d9f6d987f1ea479fe8ea56a26b89303 (diff) | |
| download | git-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/read-tree.c')
| -rw-r--r-- | builtin/read-tree.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/read-tree.c b/builtin/read-tree.c index bf87a2710b..ebc43eb805 100644 --- a/builtin/read-tree.c +++ b/builtin/read-tree.c @@ -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>"), |
