diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-05-30 08:04:05 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-30 08:04:05 +0300 |
commit | 2f76ebc93ca6bfc2aba1be330aabe391a7d093d2 (patch) | |
tree | 2aba711da4a334aeaa374345e1714973d1e92315 /builtin/gc.c | |
parent | 0e7af5f6d16a4cef7d981ac9631f35d146904eca (diff) | |
parent | 0fa5a2ed8d9f6d987f1ea479fe8ea56a26b89303 (diff) |
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/gc.c')
-rw-r--r-- | builtin/gc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/gc.c b/builtin/gc.c index c4777b2449..ccfb1ceaeb 100644 --- a/builtin/gc.c +++ b/builtin/gc.c @@ -373,7 +373,7 @@ static int need_to_gc(void) /* return NULL on success, else hostname running the gc */ static const char *lock_repo_for_gc(int force, pid_t* ret_pid) { - static struct lock_file lock; + struct lock_file lock = LOCK_INIT; char my_host[HOST_NAME_MAX + 1]; struct strbuf sb = STRBUF_INIT; struct stat st; |