diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2017-05-06 22:10:05 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-05-08 15:12:57 +0900 |
commit | 68ab61dd099a2ce9f700fa68b9b7cc7722304407 (patch) | |
tree | 7aefb77e1e5b9a92d1a0ed4305a2fd4ec6f8baec | |
parent | 18b74e513d70830d4b30d0ef19ac225e1e081c73 (diff) | |
download | git-68ab61dd099a2ce9f700fa68b9b7cc7722304407.tar.gz |
revision: convert prepare_show_merge to struct object_id
This is a caller of lookup_commit_or_die, which we will convert later
on.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | revision.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/revision.c b/revision.c index 2b56c3baf0..9453670341 100644 --- a/revision.c +++ b/revision.c @@ -1389,16 +1389,16 @@ static void prepare_show_merge(struct rev_info *revs) { struct commit_list *bases; struct commit *head, *other; - unsigned char sha1[20]; + struct object_id oid; const char **prune = NULL; int i, prune_num = 1; /* counting terminating NULL */ - if (get_sha1("HEAD", sha1)) + if (get_oid("HEAD", &oid)) die("--merge without HEAD?"); - head = lookup_commit_or_die(sha1, "HEAD"); - if (get_sha1("MERGE_HEAD", sha1)) + head = lookup_commit_or_die(oid.hash, "HEAD"); + if (get_oid("MERGE_HEAD", &oid)) die("--merge without MERGE_HEAD?"); - other = lookup_commit_or_die(sha1, "MERGE_HEAD"); + other = lookup_commit_or_die(oid.hash, "MERGE_HEAD"); add_pending_object(revs, &head->object, "HEAD"); add_pending_object(revs, &other->object, "MERGE_HEAD"); bases = get_merge_bases(head, other); |