@matheusbsbs / matheus-bagliano / commits / 7057463463
Fork 0

New test case: Criss-cross merge

Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>

Fredrik Kuivinen committed Dec 3, 2005 at 11:41 UTC 7057463463ad01266db264acf7e7b5e95e7b4ecf
1 file changed +92
t/t6021-merge-criss-cross.sh new
+92
@@ -0,0 +1,92 @@
1 +#!/bin/sh
2 +#
3 +# Copyright (c) 2005 Fredrik Kuivinen
4 +#
5 +
6 +# See http://marc.theaimsgroup.com/?l=git&m=111463358500362&w=2 for a
7 +# nice decription of what this is about.
8 +
9 +
10 +test_description='Test criss-cross merge'
11 +. ./test-lib.sh
12 +
13 +test_expect_success 'prepare repository' \
14 +'echo "1
15 +2
16 +3
17 +4
18 +5
19 +6
20 +7
21 +8
22 +9" > file &&
23 +git add file &&
24 +git commit -m "Initial commit" file &&
25 +git branch A &&
26 +git branch B &&
27 +git checkout A &&
28 +echo "1
29 +2
30 +3
31 +4
32 +5
33 +6
34 +7
35 +8 changed in B8, branch A
36 +9" > file &&
37 +git commit -m "B8" file &&
38 +git checkout B &&
39 +echo "1
40 +2
41 +3 changed in C3, branch B
42 +4
43 +5
44 +6
45 +7
46 +8
47 +9
48 +" > file &&
49 +git commit -m "C3" file &&
50 +git branch C3 &&
51 +git merge "pre E3 merge" B A &&
52 +echo "1
53 +2
54 +3 changed in E3, branch B. New file size
55 +4
56 +5
57 +6
58 +7
59 +8 changed in B8, branch A
60 +9
61 +" > file &&
62 +git commit -m "E3" file &&
63 +git checkout A &&
64 +git merge "pre D8 merge" A C3 &&
65 +echo "1
66 +2
67 +3 changed in C3, branch B
68 +4
69 +5
70 +6
71 +7
72 +8 changed in D8, branch A. New file size 2
73 +9" > file &&
74 +git commit -m D8 file'
75 +
76 +test_expect_success 'Criss-cross merge' 'git merge "final merge" A B'
77 +
78 +cat > file-expect <<EOF
79 +1
80 +2
81 +3 changed in E3, branch B. New file size
82 +4
83 +5
84 +6
85 +7
86 +8 changed in D8, branch A. New file size 2
87 +9
88 +EOF
89 +
90 +test_expect_success 'Criss-cross merge result' 'cmp file file-expect'
91 +
92 +test_done