From 6741aa6c399dec3d8f0b25699a73b8fcf974d702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 7 Oct 2009 08:13:23 +0200 Subject: Teach 'rebase -i' the command "reword" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- git-rebase--interactive.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'git-rebase--interactive.sh') diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 23ded4832..a43ee22c6 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 # -- cgit v1.2.1