3 test_description='Test merge without common ancestors'
6 # This scenario is based on a real-world repository of Shawn Pearce.
14 export GIT_COMMITTER_DATE="2006-12-12 23:28:00 +0100"
17 GIT_AUTHOR_DATE="2006-12-12 23:00:00" git commit -m 1 a1
19 git checkout -b A master
21 GIT_AUTHOR_DATE="2006-12-12 23:00:01" git commit -m A a1
23 git checkout -b B master
25 GIT_AUTHOR_DATE="2006-12-12 23:00:02" git commit -m B a1
28 git-rev-parse B > .git/MERGE_HEAD
31 GIT_AUTHOR_DATE="2006-12-12 23:00:03" git commit -m D
33 git symbolic-ref HEAD refs/heads/other
35 GIT_AUTHOR_DATE="2006-12-12 23:00:04" git commit -m 2 a1
39 GIT_AUTHOR_DATE="2006-12-12 23:00:05" git commit -m C a1
42 git-rev-parse B > .git/MERGE_HEAD
45 GIT_AUTHOR_DATE="2006-12-12 23:00:06" git commit -m E
48 git-rev-parse A > .git/MERGE_HEAD
51 GIT_AUTHOR_DATE="2006-12-12 23:00:07" git commit -m G
54 git-rev-parse C > .git/MERGE_HEAD
57 GIT_AUTHOR_DATE="2006-12-12 23:00:08" git commit -m F
59 test_expect_failure "combined merge conflicts" "git merge -m final G"
66 >>>>>>> 26f86b677eb03d4d956dbe108b29cb77061c1e73/a1
69 test_expect_success "result contains a conflict" "diff -u expect a1"
71 git ls-files --stage > out
73 100644 f16f906ab60483c100d1241dfc39868de9ec9fcb 1 a1
74 100644 cf84443e49e1b366fac938711ddf4be2d4d1d9e9 2 a1
75 100644 fd7923529855d0b274795ae3349c5e0438333979 3 a1
78 test_expect_success "virtual trees were processed" "diff -u expect out"