diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-05-30 07:04:05 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-30 07:04:05 +0200 |
commit | 2f76ebc93ca6bfc2aba1be330aabe391a7d093d2 (patch) | |
tree | 2aba711da4a334aeaa374345e1714973d1e92315 /refs | |
parent | Merge branch 'sg/t6500-no-redirect-of-stdin' (diff) | |
parent | lock_file: move static locks into functions (diff) | |
download | git-2f76ebc93ca6bfc2aba1be330aabe391a7d093d2.tar.xz git-2f76ebc93ca6bfc2aba1be330aabe391a7d093d2.zip |
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 'refs')
-rw-r--r-- | refs/files-backend.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c index 49d8f67bf1..03fb8649c7 100644 --- a/refs/files-backend.c +++ b/refs/files-backend.c @@ -2991,7 +2991,7 @@ static int files_reflog_expire(struct ref_store *ref_store, { struct files_ref_store *refs = files_downcast(ref_store, REF_STORE_WRITE, "reflog_expire"); - static struct lock_file reflog_lock; + struct lock_file reflog_lock = LOCK_INIT; struct expire_reflog_cb cb; struct ref_lock *lock; struct strbuf log_file_sb = STRBUF_INIT; |