summaryrefslogtreecommitdiff
path: root/git-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 /git-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 'git-rebase--interactive.sh')
-rwxr-xr-xgit-rebase--interactive.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 23ded48..a43ee22 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -340,6 +340,14 @@ do_next () {
pick_one $sha1 ||
die_with_patch $sha1 "Could not apply $sha1... $rest"
;;
+ reword|r)
+ comment_for_reflog reword
+
+ mark_action_done
+ pick_one $sha1 ||
+ die_with_patch $sha1 "Could not apply $sha1... $rest"
+ output git commit --amend
+ ;;
edit|e)
comment_for_reflog edit
@@ -752,6 +760,7 @@ first and then run 'git rebase --continue' again."
#
# Commands:
# p, pick = use commit
+# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
#