summaryrefslogtreecommitdiff
path: root/t/t3404-rebase-interactive.sh
diff options
context:
space:
mode:
authorStephan Beyer <s-beyer@gmx.net>2009-01-15 12:56:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-01-15 22:22:53 (GMT)
commitf8aa1b6902d7a77c26b0ef615c9070bbed4be5c4 (patch)
tree4bc219ec59ccc0cd7775b504893b64ea287ed12e /t/t3404-rebase-interactive.sh
parentdc7f55cbe9a544ba7af981c00c52efb2d0283a8f (diff)
downloadgit-f8aa1b6902d7a77c26b0ef615c9070bbed4be5c4.zip
git-f8aa1b6902d7a77c26b0ef615c9070bbed4be5c4.tar.gz
git-f8aa1b6902d7a77c26b0ef615c9070bbed4be5c4.tar.bz2
t3404: Add test case for auto-amending only edited commits after "edit"
Add a test case for the bugfix introduced by commit c14c3c82d "git-rebase--interactive: auto amend only edited commit". 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.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 1182b46..2cc8e7a 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -388,6 +388,23 @@ test_expect_success 'aborted --continue does not squash commits after "edit"' '
git rebase --abort
'
+test_expect_success 'auto-amend only edited commits after "edit"' '
+ test_tick &&
+ FAKE_LINES="edit 1" git rebase -i HEAD^ &&
+ echo "edited again" > file7 &&
+ git add file7 &&
+ FAKE_COMMIT_MESSAGE="edited file7 again" git commit &&
+ echo "and again" > file7 &&
+ git add file7 &&
+ test_tick &&
+ (
+ FAKE_COMMIT_MESSAGE="and again" &&
+ export FAKE_COMMIT_MESSAGE &&
+ test_must_fail git rebase --continue
+ ) &&
+ git rebase --abort
+'
+
test_expect_success 'rebase a detached HEAD' '
grandparent=$(git rev-parse HEAD~2) &&
git checkout $(git rev-parse HEAD) &&