summaryrefslogtreecommitdiff
path: root/builtin/reset.c
diff options
context:
space:
mode:
authorLibravatar brian m. carlson <sandals@crustytoothpaste.net>2017-10-15 22:06:50 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-10-16 11:05:50 +0900
commit2616a5e5089814188a583572bd9bf578b18a2a40 (patch)
treee332a31b1f6f6262a1c0bdd36cfe7e46b2459a7f /builtin/reset.c
parentrefs/files-backend: convert struct ref_to_prune to object_id (diff)
downloadtgif-2616a5e5089814188a583572bd9bf578b18a2a40.tar.xz
refs: convert delete_ref and refs_delete_ref to struct object_id
Convert delete_ref and refs_delete_ref to take a pointer to struct object_id. Update the documentation accordingly, including referring to null_oid in lowercase, as it is not a #define constant. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/reset.c')
-rw-r--r--builtin/reset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/reset.c b/builtin/reset.c
index 9cd89b2305..5f3632e05b 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -269,7 +269,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(NULL, "ORIG_HEAD", old_orig->hash, 0);
+ delete_ref(NULL, "ORIG_HEAD", old_orig, 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);