summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-10-15 22:06:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-10-16 02:05:50 (GMT)
commitae077771b09fac4d663e3f8c039318a97eb3a15b (patch)
tree53b4ed92e41aad737b49a44fc60871f7df1445dc /sequencer.c
parent2616a5e5089814188a583572bd9bf578b18a2a40 (diff)
downloadgit-ae077771b09fac4d663e3f8c039318a97eb3a15b.zip
git-ae077771b09fac4d663e3f8c039318a97eb3a15b.tar.gz
git-ae077771b09fac4d663e3f8c039318a97eb3a15b.tar.bz2
refs: convert update_ref and refs_update_ref to use struct object_id
Convert update_ref, refs_update_ref, and write_pseudoref to use struct object_id. Update the existing callers as well. Remove update_ref_oid, as it is no longer needed. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sequencer.c b/sequencer.c
index e258bb6..cc3c0da 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -1115,11 +1115,11 @@ static int do_pick_commit(enum todo_command command, struct commit *commit,
* write it at all.
*/
if (command == TODO_PICK && !opts->no_commit && (res == 0 || res == 1) &&
- update_ref(NULL, "CHERRY_PICK_HEAD", commit->object.oid.hash, NULL,
+ update_ref(NULL, "CHERRY_PICK_HEAD", &commit->object.oid, NULL,
REF_NODEREF, UPDATE_REFS_MSG_ON_ERR))
res = -1;
if (command == TODO_REVERT && ((opts->no_commit && res == 0) || res == 1) &&
- update_ref(NULL, "REVERT_HEAD", commit->object.oid.hash, NULL,
+ update_ref(NULL, "REVERT_HEAD", &commit->object.oid, NULL,
REF_NODEREF, UPDATE_REFS_MSG_ON_ERR))
res = -1;
@@ -2124,8 +2124,8 @@ cleanup_head_ref:
}
msg = reflog_message(opts, "finish", "%s onto %s",
head_ref.buf, buf.buf);
- if (update_ref(msg, head_ref.buf, head.hash, orig.hash,
- REF_NODEREF, UPDATE_REFS_MSG_ON_ERR)) {
+ if (update_ref(msg, head_ref.buf, &head, &orig,
+ REF_NODEREF, UPDATE_REFS_MSG_ON_ERR)) {
res = error(_("could not update %s"),
head_ref.buf);
goto cleanup_head_ref;