name-rev: refactor logic to see if a new candidate is a better name
[gitweb.git] / builtin / reset.c
index 8ab915bfcb71ae5d5f4bd1bebe7fd3c8725780b2..fc3b906c47bbcbefdc35b178016c031e46c06691 100644 (file)
@@ -256,7 +256,7 @@ static int reset_refs(const char *rev, const struct object_id *oid)
                update_ref_oid(msg.buf, "ORIG_HEAD", orig, old_orig, 0,
                           UPDATE_REFS_MSG_ON_ERR);
        } else if (old_orig)
-               delete_ref("ORIG_HEAD", old_orig->hash, 0);
+               delete_ref(NULL, "ORIG_HEAD", old_orig->hash, 0);
        set_reflog_message(&msg, "updating HEAD", rev);
        update_ref_status = update_ref_oid(msg.buf, "HEAD", oid, orig, 0,
                                       UPDATE_REFS_MSG_ON_ERR);