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>
This commit is contained in:
brian m. carlson 2017-05-06 22:10:05 +00:00 committed by Junio C Hamano
parent 18b74e513d
commit 68ab61dd09

View File

@ -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);