grep: simplify -p output
[git/vmiklos.git] / t / t7602-merge-octopus-many.sh
blob01e5415e943f3e16154f2f4d999f85a9d8b6ae49
1 #!/bin/sh
3 test_description='git merge
5 Testing octopus merge with more than 25 refs.'
7 . ./test-lib.sh
9 test_expect_success 'setup' '
10 echo c0 > c0.c &&
11 git add c0.c &&
12 git commit -m c0 &&
13 git tag c0 &&
14 i=1 &&
15 while test $i -le 30
17 git reset --hard c0 &&
18 echo c$i > c$i.c &&
19 git add c$i.c &&
20 git commit -m c$i &&
21 git tag c$i &&
22 i=`expr $i + 1` || return 1
23 done
26 test_expect_success 'merge c1 with c2, c3, c4, ... c29' '
27 git reset --hard c1 &&
28 i=2 &&
29 refs="" &&
30 while test $i -le 30
32 refs="$refs c$i"
33 i=`expr $i + 1`
34 done
35 git merge $refs &&
36 test "$(git rev-parse c1)" != "$(git rev-parse HEAD)" &&
37 i=1 &&
38 while test $i -le 30
40 test "$(git rev-parse c$i)" = "$(git rev-parse HEAD^$i)" &&
41 i=`expr $i + 1` || return 1
42 done &&
43 git diff --exit-code &&
44 i=1 &&
45 while test $i -le 30
47 test -f c$i.c &&
48 i=`expr $i + 1` || return 1
49 done
52 test_done