Merge branch 'nd/maint-autofix-tag-in-head' into maint
* nd/maint-autofix-tag-in-head: Accept tags in HEAD or MERGE_HEAD merge: remove global variable head[] merge: use return value of resolve_ref() to determine if HEAD is invalid merge: keep stash[] a local variable Conflicts: builtin/merge.c
This commit is contained in:
@ -1011,10 +1011,12 @@ static void prepare_show_merge(struct rev_info *revs)
|
||||
const char **prune = NULL;
|
||||
int i, prune_num = 1; /* counting terminating NULL */
|
||||
|
||||
if (get_sha1("HEAD", sha1) || !(head = lookup_commit(sha1)))
|
||||
if (get_sha1("HEAD", sha1))
|
||||
die("--merge without HEAD?");
|
||||
if (get_sha1("MERGE_HEAD", sha1) || !(other = lookup_commit(sha1)))
|
||||
head = lookup_commit_or_die(sha1, "HEAD");
|
||||
if (get_sha1("MERGE_HEAD", sha1))
|
||||
die("--merge without MERGE_HEAD?");
|
||||
other = lookup_commit_or_die(sha1, "MERGE_HEAD");
|
||||
add_pending_object(revs, &head->object, "HEAD");
|
||||
add_pending_object(revs, &other->object, "MERGE_HEAD");
|
||||
bases = get_merge_bases(head, other, 1);
|
||||
|
||||
Reference in New Issue
Block a user