diff -u expect .git/.dotest-merge/patch &&
diff -u expect2 file1 &&
test 4 = $(grep -v "^#" < .git/.dotest-merge/done | wc -l) &&
- test 0 = $(grep -v "^#" < .git/.dotest-merge/todo | wc -l)
+ test 0 = $(grep -ve "^#" -e "^$" < .git/.dotest-merge/git-rebase-todo |
+ wc -l)
'
test_expect_success 'abort' '
git show HEAD | grep "^Author: Twerp Snog"
'
+test_expect_success '-p handles "no changes" gracefully' '
+ HEAD=$(git rev-parse HEAD) &&
+ git rebase -i -p HEAD^ &&
+ test $HEAD = $(git rev-parse HEAD)
+'
+
test_expect_success 'preserve merges with -p' '
git checkout -b to-be-preserved master^ &&
: > unrelated-file &&