Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--commit.c2
-rwxr-xr-xt/t7600-merge.sh11
2 files changed, 12 insertions, 1 deletions
diff --git a/commit.c b/commit.c
index d20b14ee3e..03e73f323a 100644
--- a/commit.c
+++ b/commit.c
@@ -747,7 +747,7 @@ struct commit_list *reduce_heads(struct commit_list *heads)
num_other = 0;
for (q = heads; q; q = q->next) {
- if (p == q)
+ if (p->item == q->item)
continue;
other[num_other++] = q->item;
}
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index 72ef2e55d9..f035ea376e 100755
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
@@ -479,4 +479,15 @@ test_expect_success 'merge log message' '
test_debug 'gitk --all'
+test_expect_success 'merge c1 with c0, c2, c0, and c1' '
+ git reset --hard c1 &&
+ git config branch.master.mergeoptions "" &&
+ test_tick &&
+ git merge c0 c2 c0 c1 &&
+ verify_merge file result.1-5 &&
+ verify_parents $c1 $c2
+'
+
+test_debug 'gitk --all'
+
test_done