commit_packed_refs(): remove call to packed_refs_unlock()

Instead, change the callers of `commit_packed_refs()` to call
`packed_refs_unlock()`.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Michael Haggerty
2017-06-23 09:01:45 +02:00
committed by Junio C Hamano
parent 9051198214
commit 42c7f7ff96
2 changed files with 10 additions and 10 deletions

View File

@ -1131,6 +1131,7 @@ static int files_pack_refs(struct ref_store *ref_store, unsigned int flags)
if (commit_packed_refs(refs->packed_ref_store, &err))
die("unable to overwrite old ref-pack file: %s", err.buf);
packed_refs_unlock(refs->packed_ref_store);
prune_refs(refs, refs_to_prune);
strbuf_release(&err);
@ -2699,6 +2700,7 @@ static int files_initial_transaction_commit(struct ref_store *ref_store,
}
cleanup:
packed_refs_unlock(refs->packed_ref_store);
transaction->state = REF_TRANSACTION_CLOSED;
string_list_clear(&affected_refnames, 0);
return ret;