[PATCH v6 38/42] refs.c: call lock_ref_sha1_basic directly from commit
- From
Ronnie Sahlberg <sahlberg@google.com>
- Date
- May 1, 2014, 20:37 UTC
- Message-ID
- <1398976662-6962-39-git-send-email-sahlberg@google.com>
- In-Reply-To
- <1398976662-6962-1-git-send-email-sahlberg@google.com>
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> --- refs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/refs.c b/refs.c index 8d82742..51cd41e 100644 --- a/refs.c +++ b/refs.c @@ -3462,12 +3462,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'.",
-- 2.0.0.rc1.351.g4d2c8e4