Thread (49 messages) flat view 49 messages, 1 author, 2016-06-15
DORMANTno replies REVIEWED: 1 (0M)

Revision v17 of 6 in this series; 1 review trailer.

Revisions (6)
  1. v15 [diff vs current]
  2. v16 [diff vs current]
  3. v17 current
  4. v18 [diff vs current]
  5. v19 [diff vs current]
  6. v20 [diff vs current]

[PATCH v17 44/48] refs.c: call lock_ref_sha1_basic directly from commit

From: Ronnie Sahlberg <hidden>
Date: 2016-06-15 23:01:38
Subsystem: the rest · Maintainer: Linus Torvalds

Skip using the lock_any_ref_for_update wrapper and call lock_ref_sha1_basic
directly from the commit function.

Reviewed-by: Jonathan Nieder <redacted>
Signed-off-by: Ronnie Sahlberg <redacted>
---
 refs.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/refs.c b/refs.c
index 69815d9..d67479e 100644
--- a/refs.c
+++ b/refs.c
@@ -3571,12 +3571,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.282.g3799eda.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help