summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2017-10-28 07:27:15 (GMT)
committerMichael Haggerty <mhagger@alum.mit.edu>2017-10-28 07:27:15 (GMT)
commitff08e56cde739152a59a86f5aa996954a2ec0614 (patch)
tree9c7bc94151c5a082377ecb438e66aea140924edb /sequencer.c
parent2f899857a9f425cb59f8a15c2ea7a52100c51a23 (diff)
parent4f01e5080c4a7eee69da47c958888358e6127584 (diff)
downloadgit-ff08e56cde739152a59a86f5aa996954a2ec0614.zip
git-ff08e56cde739152a59a86f5aa996954a2ec0614.tar.gz
git-ff08e56cde739152a59a86f5aa996954a2ec0614.tar.bz2
Merge branch 'bc/object-id' into base
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sequencer.c b/sequencer.c
index f2a10cc..64abaad 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -393,7 +393,7 @@ static int fast_forward_to(const struct object_id *to, const struct object_id *f
transaction = ref_transaction_begin(&err);
if (!transaction ||
ref_transaction_update(transaction, "HEAD",
- to->hash, unborn ? null_sha1 : from->hash,
+ to, unborn ? &null_oid : from,
0, sb.buf, &err) ||
ref_transaction_commit(transaction, &err)) {
ref_transaction_free(transaction);
@@ -489,7 +489,7 @@ static int is_index_unchanged(void)
struct object_id head_oid;
struct commit *head_commit;
- if (!resolve_ref_unsafe("HEAD", RESOLVE_REF_READING, head_oid.hash, NULL))
+ if (!resolve_ref_unsafe("HEAD", RESOLVE_REF_READING, &head_oid, NULL))
return error(_("could not resolve HEAD commit\n"));
head_commit = lookup_commit(&head_oid);
@@ -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;
@@ -1630,7 +1630,7 @@ static int rollback_single_pick(void)
if (!file_exists(git_path_cherry_pick_head()) &&
!file_exists(git_path_revert_head()))
return error(_("no cherry-pick or revert in progress"));
- if (read_ref_full("HEAD", 0, head_oid.hash, NULL))
+ if (read_ref_full("HEAD", 0, &head_oid, NULL))
return error(_("cannot resolve HEAD"));
if (is_null_oid(&head_oid))
return error(_("cannot abort from a branch yet to be born"));
@@ -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;