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>
brian m. carlson committed
May 6, 2017 at 22:10 UTC
68ab61dd099a2ce9f700fa68b9b7cc7722304407
1 file changed
+5
-5
revision.c
+5
-5
@@ -1389,16 +1389,16 @@ static void prepare_show_merge(struct rev_info *revs)
1389
{
1390
struct commit_list *bases;
1391
struct commit *head, *other;
1392
- unsigned char sha1[20];
1392
+ struct object_id oid;
1393
const char **prune = NULL;
1394
int i, prune_num = 1; /* counting terminating NULL */
1395
1396
- if (get_sha1("HEAD", sha1))
1396
+ if (get_oid("HEAD", &oid))
1397
die("--merge without HEAD?");
1398
- head = lookup_commit_or_die(sha1, "HEAD");
1399
- if (get_sha1("MERGE_HEAD", sha1))
1398
+ head = lookup_commit_or_die(oid.hash, "HEAD");
1399
+ if (get_oid("MERGE_HEAD", &oid))
1400
die("--merge without MERGE_HEAD?");
1401
- other = lookup_commit_or_die(sha1, "MERGE_HEAD");
1401
+ other = lookup_commit_or_die(oid.hash, "MERGE_HEAD");
1402
add_pending_object(revs, &head->object, "HEAD");
1403
add_pending_object(revs, &other->object, "MERGE_HEAD");
1404
bases = get_merge_bases(head, other);