summaryrefslogtreecommitdiff
path: root/t/t3404-rebase-interactive.sh
diff options
context:
space:
mode:
authorBjörn Gustavsson <bgustavsson@gmail.com>2009-10-07 06:13:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-10-08 04:46:41 (GMT)
commit6741aa6c399dec3d8f0b25699a73b8fcf974d702 (patch)
treec18491e3e7061fd82a47dbd7536df2595219e784 /t/t3404-rebase-interactive.sh
parentdbc1b1f71052c084a84b5c395e1cb4b5ae526fcb (diff)
downloadgit-6741aa6c399dec3d8f0b25699a73b8fcf974d702.zip
git-6741aa6c399dec3d8f0b25699a73b8fcf974d702.tar.gz
git-6741aa6c399dec3d8f0b25699a73b8fcf974d702.tar.bz2
Teach 'rebase -i' the command "reword"
Make it easier to edit just the commit message for a commit using 'git rebase -i' by introducing the "reword" command. Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3404-rebase-interactive.sh')
-rwxr-xr-xt/t3404-rebase-interactive.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index 4cae019..3a37793 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -470,4 +470,18 @@ test_expect_success 'avoid unnecessary reset' '
test 123456789 = $MTIME
'
+test_expect_success 'reword' '
+ git checkout -b reword-branch master &&
+ FAKE_LINES="1 2 3 reword 4" FAKE_COMMIT_MESSAGE="E changed" git rebase -i A &&
+ git show HEAD | grep "E changed" &&
+ test $(git rev-parse master) != $(git rev-parse HEAD) &&
+ test $(git rev-parse master^) = $(git rev-parse HEAD^) &&
+ FAKE_LINES="1 2 reword 3 4" FAKE_COMMIT_MESSAGE="D changed" git rebase -i A &&
+ git show HEAD^ | grep "D changed" &&
+ FAKE_LINES="reword 1 2 3 4" FAKE_COMMIT_MESSAGE="B changed" git rebase -i A &&
+ git show HEAD~3 | grep "B changed" &&
+ FAKE_LINES="1 reword 2 3 4" FAKE_COMMIT_MESSAGE="C changed" git rebase -i A &&
+ git show HEAD~2 | grep "C changed"
+'
+
test_done