Merge branch 'master' of git://repo.or.cz/git-gui
[gitweb.git] / t / t3409-rebase-preserve-merges.sh
index 5ddd1d1a93c74fe81da142f07a659c75e3fd9e7c..74161a42ec34c2d33780a80425ec1be5a4028f03 100755 (executable)
@@ -32,33 +32,34 @@ export GIT_AUTHOR_EMAIL
 test_expect_success 'setup for merge-preserving rebase' \
        'echo First > A &&
        git add A &&
-       git-commit -m "Add A1" &&
+       git commit -m "Add A1" &&
        git checkout -b topic &&
        echo Second > B &&
        git add B &&
-       git-commit -m "Add B1" &&
+       git commit -m "Add B1" &&
        git checkout -f master &&
        echo Third >> A &&
-       git-commit -a -m "Modify A2" &&
+       git commit -a -m "Modify A2" &&
 
        git clone ./. clone1 &&
-       cd clone1 &&
+       (cd clone1 &&
        git checkout -b topic origin/topic &&
-       git merge origin/master &&
-       cd .. &&
+       git merge origin/master
+       ) &&
 
        echo Fifth > B &&
        git add B &&
        git commit -m "Add different B" &&
 
        git clone ./. clone2 &&
-       cd clone2 &&
-       git checkout -b topic origin/topic &&
-       test_must_fail git merge origin/master &&
-       echo Resolved > B &&
-       git add B &&
-       git commit -m "Merge origin/master into topic" &&
-       cd .. &&
+       (
+               cd clone2 &&
+               git checkout -b topic origin/topic &&
+               test_must_fail git merge origin/master &&
+               echo Resolved >B &&
+               git add B &&
+               git commit -m "Merge origin/master into topic"
+       ) &&
 
        git checkout topic &&
        echo Fourth >> B &&
@@ -71,11 +72,11 @@ test_expect_success 'rebase -p fakes interactive rebase' '
        git fetch &&
        git rebase -p origin/topic &&
        test 1 = $(git rev-list --all --pretty=oneline | grep "Modify A" | wc -l) &&
-       test 1 = $(git rev-list --all --pretty=oneline | grep "Merge commit" | wc -l)
+       test 1 = $(git rev-list --all --pretty=oneline | grep "Merge remote branch " | wc -l)
        )
 '
 
-test_expect_failure '--continue works after a conflict' '
+test_expect_success '--continue works after a conflict' '
        (
        cd clone2 &&
        git fetch &&
@@ -83,6 +84,7 @@ test_expect_failure '--continue works after a conflict' '
        test 2 = $(git ls-files B | wc -l) &&
        echo Resolved again > B &&
        test_must_fail git rebase --continue &&
+       grep "^@@@ " .git/rebase-merge/patch &&
        git add B &&
        git rebase --continue &&
        test 1 = $(git rev-list --all --pretty=oneline | grep "Modify A" | wc -l) &&