summaryrefslogtreecommitdiff
path: root/builtin/receive-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-30 05:04:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-30 05:04:05 (GMT)
commit2f76ebc93ca6bfc2aba1be330aabe391a7d093d2 (patch)
tree2aba711da4a334aeaa374345e1714973d1e92315 /builtin/receive-pack.c
parent0e7af5f6d16a4cef7d981ac9631f35d146904eca (diff)
parent0fa5a2ed8d9f6d987f1ea479fe8ea56a26b89303 (diff)
downloadgit-2f76ebc93ca6bfc2aba1be330aabe391a7d093d2.zip
git-2f76ebc93ca6bfc2aba1be330aabe391a7d093d2.tar.gz
git-2f76ebc93ca6bfc2aba1be330aabe391a7d093d2.tar.bz2
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/receive-pack.c')
-rw-r--r--builtin/receive-pack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 0dd1632..132a533 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -876,7 +876,7 @@ static void refuse_unconfigured_deny_delete_current(void)
static int command_singleton_iterator(void *cb_data, struct object_id *oid);
static int update_shallow_ref(struct command *cmd, struct shallow_info *si)
{
- static struct lock_file shallow_lock;
+ struct lock_file shallow_lock = LOCK_INIT;
struct oid_array extra = OID_ARRAY_INIT;
struct check_connected_options opt = CHECK_CONNECTED_INIT;
uint32_t mask = 1 << (cmd->index % 32);