git-commit-vandalism/refs
Mathias Rav 81fcb698e0 files_initial_transaction_commit(): only unlock if locked
Running git clone --single-branch --mirror -b TAGNAME previously
triggered the following error message:

	fatal: multiple updates for ref 'refs/tags/TAGNAME' not allowed.

This error condition is handled in files_initial_transaction_commit().

42c7f7ff9 ("commit_packed_refs(): remove call to `packed_refs_unlock()`", 2017-06-23)
introduced incorrect unlocking in the error path of this function,
which changes the error message to

	fatal: BUG: packed_refs_unlock() called when not locked

Move the call to packed_refs_unlock() above the "cleanup:" label
since the unlocking should only be done in the last error path.

Signed-off-by: Mathias Rav <m@git.strova.dk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-19 14:16:56 -08:00
..
files-backend.c files_initial_transaction_commit(): only unlock if locked 2018-01-19 14:16:56 -08:00
iterator.c prefix_ref_iterator: break when we leave the prefix 2017-09-14 15:19:07 +09:00
packed-backend.c Merge branch 'mh/avoid-rewriting-packed-refs' into maint 2017-12-06 09:08:50 -08:00
packed-backend.h files-backend: don't rewrite the packed-refs file unnecessarily 2017-10-30 09:45:15 +09:00
ref-cache.c ref_cache: remove support for storing peeled values 2017-09-25 18:02:46 +09:00
ref-cache.h ref_cache: remove support for storing peeled values 2017-09-25 18:02:46 +09:00
refs-internal.h Merge branch 'mh/mmap-packed-refs' 2017-10-03 15:42:50 +09:00