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:
parent
18b74e513d
commit
68ab61dd09
10
revision.c
10
revision.c
@ -1389,16 +1389,16 @@ static void prepare_show_merge(struct rev_info *revs)
|
|||||||
{
|
{
|
||||||
struct commit_list *bases;
|
struct commit_list *bases;
|
||||||
struct commit *head, *other;
|
struct commit *head, *other;
|
||||||
unsigned char sha1[20];
|
struct object_id oid;
|
||||||
const char **prune = NULL;
|
const char **prune = NULL;
|
||||||
int i, prune_num = 1; /* counting terminating NULL */
|
int i, prune_num = 1; /* counting terminating NULL */
|
||||||
|
|
||||||
if (get_sha1("HEAD", sha1))
|
if (get_oid("HEAD", &oid))
|
||||||
die("--merge without HEAD?");
|
die("--merge without HEAD?");
|
||||||
head = lookup_commit_or_die(sha1, "HEAD");
|
head = lookup_commit_or_die(oid.hash, "HEAD");
|
||||||
if (get_sha1("MERGE_HEAD", sha1))
|
if (get_oid("MERGE_HEAD", &oid))
|
||||||
die("--merge without MERGE_HEAD?");
|
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, &head->object, "HEAD");
|
||||||
add_pending_object(revs, &other->object, "MERGE_HEAD");
|
add_pending_object(revs, &other->object, "MERGE_HEAD");
|
||||||
bases = get_merge_bases(head, other);
|
bases = get_merge_bases(head, other);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user