3 # Copyright (c) 2005 Fredrik Kuivinen
6 # See http://marc.theaimsgroup.com/?l=git&m=111463358500362&w=2 for a
7 # nice decription of what this is about.
10 test_description='Test criss-cross merge'
13 if test "$no_python"; then
14 echo "Skipping: no python => no recursive merge"
19 test_expect_success 'prepare repository' \
30 git commit -m "Initial commit" file &&
41 8 changed in B8, branch A
43 git commit -m "B8" file &&
47 3 changed in C3, branch B
55 git commit -m "C3" file &&
57 git merge "pre E3 merge" B A &&
60 3 changed in E3, branch B. New file size
65 8 changed in B8, branch A
68 git commit -m "E3" file &&
70 git merge "pre D8 merge" A C3 &&
73 3 changed in C3, branch B
78 8 changed in D8, branch A. New file size 2
80 git commit -m D8 file'
82 test_expect_success 'Criss-cross merge' 'git merge "final merge" A B'
84 cat > file-expect <<EOF
87 3 changed in E3, branch B. New file size
92 8 changed in D8, branch A. New file size 2
96 test_expect_success 'Criss-cross merge result' 'cmp file file-expect'