summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--refs/files-backend.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 6f8fecd024..769e5c4100 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -3479,7 +3479,7 @@ static int lock_ref_for_update(struct ref_update *update,
* the transaction, so we have to read it here
* to record and possibly check old_sha1:
*/
- if (read_ref_full(update->refname, 0,
+ if (read_ref_full(referent.buf, 0,
lock->old_oid.hash, NULL)) {
if (update->flags & REF_HAVE_OLD) {
strbuf_addf(err, "cannot lock ref '%s': "