Skip to content

Commit 5d94a1b

Browse files
rsahlberggitster
authored andcommitted
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 <[email protected]> Reviewed-by: Michael Haggerty <[email protected]> Signed-off-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8a9df90 commit 5d94a1b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

refs.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3632,12 +3632,12 @@ int ref_transaction_commit(struct ref_transaction *transaction,
36323632
for (i = 0; i < n; i++) {
36333633
struct ref_update *update = updates[i];
36343634

3635-
update->lock = lock_any_ref_for_update(update->refname,
3636-
(update->have_old ?
3637-
update->old_sha1 :
3638-
NULL),
3639-
update->flags,
3640-
&update->type);
3635+
update->lock = lock_ref_sha1_basic(update->refname,
3636+
(update->have_old ?
3637+
update->old_sha1 :
3638+
NULL),
3639+
update->flags,
3640+
&update->type);
36413641
if (!update->lock) {
36423642
if (err)
36433643
strbuf_addf(err, "Cannot lock the ref '%s'.",

0 commit comments

Comments
 (0)