Skip to content

Commit

Permalink
refs.c: call lock_ref_sha1_basic directly from commit
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
rsahlberg authored and gitster committed Oct 15, 2014
1 parent 8a9df90 commit 5d94a1b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions refs.c
Expand Up @@ -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'.",
Expand Down

0 comments on commit 5d94a1b

Please sign in to comment.