summaryrefslogtreecommitdiff
path: root/t/t3404-rebase-interactive.sh
diff options
context:
space:
mode:
authorStephan Beyer <s-beyer@gmx.net>2009-01-15 12:56:15 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-01-15 22:22:42 (GMT)
commitdc7f55cbe9a544ba7af981c00c52efb2d0283a8f (patch)
tree28da93d06c545388f7ca18ed4619803bd3614f21 /t/t3404-rebase-interactive.sh
parent944019c8b3896ff8d169864096eedc60155c80a4 (diff)
downloadgit-dc7f55cbe9a544ba7af981c00c52efb2d0283a8f.zip
git-dc7f55cbe9a544ba7af981c00c52efb2d0283a8f.tar.gz
git-dc7f55cbe9a544ba7af981c00c52efb2d0283a8f.tar.bz2
t3404: Add test case for aborted --continue after "edit"
Add a test case for the bugfix introduced by commit 8beb1f33d "git-rebase-interactive: do not squash commits on abort". Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3404-rebase-interactive.sh')
-rwxr-xr-xt/t3404-rebase-interactive.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 7d10a27..1182b46 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -373,6 +373,21 @@ test_expect_success '--continue tries to commit, even for "edit"' '
test $parent = $(git rev-parse HEAD^)
'
+test_expect_success 'aborted --continue does not squash commits after "edit"' '
+ old=$(git rev-parse HEAD) &&
+ test_tick &&
+ FAKE_LINES="edit 1" git rebase -i HEAD^ &&
+ echo "edited again" > file7 &&
+ git add file7 &&
+ (
+ FAKE_COMMIT_MESSAGE=" " &&
+ export FAKE_COMMIT_MESSAGE &&
+ test_must_fail git rebase --continue
+ ) &&
+ test $old = $(git rev-parse HEAD) &&
+ git rebase --abort
+'
+
test_expect_success 'rebase a detached HEAD' '
grandparent=$(git rev-parse HEAD~2) &&
git checkout $(git rev-parse HEAD) &&