From: Ronnie Sahlberg Date: Thu, 1 May 2014 17:43:39 +0000 (-0700) Subject: refs.c: call lock_ref_sha1_basic directly from commit X-Git-Tag: v2.2.0-rc0~32^2~16 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/5d94a1b03318d14847a40f233560c2a87fb16cfa refs.c: call lock_ref_sha1_basic directly from commit Skip using the lock_any_ref_for_update wrapper and call lock_ref_sha1_basic directly from the commit function. Signed-off-by: Ronnie Sahlberg Reviewed-by: Michael Haggerty Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- diff --git a/refs.c b/refs.c index 9c0162378f..b591b9c321 100644 --- a/refs.c +++ b/refs.c @@ -3632,12 +3632,12 @@ int ref_transaction_commit(struct ref_transaction *transaction, for (i = 0; i < n; i++) { struct ref_update *update = updates[i]; - update->lock = lock_any_ref_for_update(update->refname, - (update->have_old ? - update->old_sha1 : - NULL), - update->flags, - &update->type); + update->lock = lock_ref_sha1_basic(update->refname, + (update->have_old ? + update->old_sha1 : + NULL), + update->flags, + &update->type); if (!update->lock) { if (err) strbuf_addf(err, "Cannot lock the ref '%s'.",