3 # Copyright (c) 2006 Junio C Hamano
6 test_description='git rebase --merge test'
10 if test "$no_python"; then
11 echo "Skipping: no python => no recursive merge"
17 jumps over the lazy dog."
18 for i in 1 2 3 4 5 6 7 8 9 10
23 test_expect_success setup '
25 git commit -m"initial" &&
27 echo "11 $T" >>original &&
28 git commit -a -m"master updates a bit." &&
30 echo "12 $T" >>original &&
31 git commit -a -m"master updates a bit more." &&
34 (echo "0 $T" ; cat original) >renamed &&
36 git update-index --force-remove original &&
37 git commit -a -m"side renames and edits." &&
39 tr "[a-z]" "[A-Z]" <original >newfile &&
41 git commit -a -m"side edits further." &&
43 tr "[a-m]" "[A-M]" <original >newfile &&
45 git commit -a -m"side edits once again." &&
47 git branch test-rebase side &&
48 git branch test-rebase-pick side &&
49 git branch test-reference-pick side &&
50 git checkout -b test-merge side
53 test_expect_success 'reference merge' '
54 git merge -s recursive "reference merge" HEAD master
57 test_expect_success rebase '
58 git checkout test-rebase &&
59 git rebase --merge master
62 test_expect_success 'merge and rebase should match' '
63 git diff-tree -r test-rebase test-merge >difference &&
73 test_expect_success 'rebase the other way' '
74 git reset --hard master &&
75 git rebase --merge side
78 test_expect_success 'merge and rebase should match' '
79 git diff-tree -r test-rebase test-merge >difference &&
89 test_expect_success 'picking rebase' '
90 git reset --hard side &&
91 git rebase --merge --onto master side^^ &&
92 mb=$(git merge-base master HEAD) &&
93 if test "$mb" = "$(git rev-parse master)"
100 f=$(git diff-tree --name-only HEAD^ HEAD) &&
101 g=$(git diff-tree --name-only HEAD^^ HEAD^) &&