aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/t3404-rebase-interactive.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 883cf2959..c25133699 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -63,7 +63,10 @@ test_expect_success 'setup' '
cat > fake-editor.sh << EOF
#!/bin/sh
-test "\$1" = .git/COMMIT_EDITMSG && exit
+test "\$1" = .git/COMMIT_EDITMSG && {
+ test -z "\$FAKE_COMMIT_MESSAGE" || echo "\$FAKE_COMMIT_MESSAGE" > "\$1"
+ exit
+}
test -z "\$FAKE_LINES" && exit
grep -v "^#" < "\$1" > "\$1".tmp
rm "\$1"
@@ -181,6 +184,7 @@ test_expect_success 'preserve merges with -p' '
echo C > file1 &&
test_tick &&
git commit -m K file1 &&
+ test_tick &&
git rebase -i -p --onto branch1 master &&
test $(git rev-parse HEAD^^2) = $(git rev-parse to-be-preserved) &&
test $(git rev-parse HEAD~3) = $(git rev-parse branch1) &&
@@ -188,4 +192,14 @@ test_expect_success 'preserve merges with -p' '
test $(git show HEAD~2:file1) = B
'
+test_expect_success '--continue tries to commit' '
+ test_tick &&
+ ! git rebase -i --onto new-branch1 HEAD^ &&
+ echo resolved > file1 &&
+ git add file1 &&
+ FAKE_COMMIT_MESSAGE="chouette!" git rebase --continue &&
+ test $(git rev-parse HEAD^) = $(git rev-parse new-branch1) &&
+ git show HEAD | grep chouette
+'
+
test_done