summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonnie Sahlberg <sahlberg@google.com>2014-05-01 10:43:39 -0700
committerJunio C Hamano <gitster@pobox.com>2014-09-11 14:40:24 -0700
commit754541efa1e4baf5d1130e1c4e0794e711a2bd20 (patch)
tree051ef0697d6b30f1b8ab1d8310be5e0c3305802c
parentd9390c98586d6487f354d1a33e66ff9461c2218a (diff)
downloadgit-754541efa1e4baf5d1130e1c4e0794e711a2bd20.tar.gz
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 <sahlberg@google.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--refs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/refs.c b/refs.c
index 3c2ce57125..f124c2ba16 100644
--- a/refs.c
+++ b/refs.c
@@ -3578,12 +3578,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'.",