Skip to content

Commit 68ab61d

Browse files
bk2204gitster
authored andcommitted
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>
1 parent 18b74e5 commit 68ab61d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

revision.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,16 +1389,16 @@ static void prepare_show_merge(struct rev_info *revs)
13891389
{
13901390
struct commit_list *bases;
13911391
struct commit *head, *other;
1392-
unsigned char sha1[20];
1392+
struct object_id oid;
13931393
const char **prune = NULL;
13941394
int i, prune_num = 1; /* counting terminating NULL */
13951395

1396-
if (get_sha1("HEAD", sha1))
1396+
if (get_oid("HEAD", &oid))
13971397
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))
14001400
die("--merge without MERGE_HEAD?");
1401-
other = lookup_commit_or_die(sha1, "MERGE_HEAD");
1401+
other = lookup_commit_or_die(oid.hash, "MERGE_HEAD");
14021402
add_pending_object(revs, &head->object, "HEAD");
14031403
add_pending_object(revs, &other->object, "MERGE_HEAD");
14041404
bases = get_merge_bases(head, other);

0 commit comments

Comments
 (0)