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 &&
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 &&
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) &&