git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Wong <andrew.kw.w@gmail.com>
To: git@vger.kernel.org
Cc: Andrew Wong <andrew.kw.w@gmail.com>
Subject: [PATCH 1/2] rebase -i: run "commit --amend" with verbose if rebase was called with -v
Date: Sun, 24 Jul 2011 23:38:32 -0400	[thread overview]
Message-ID: <1311565113-5022-2-git-send-email-andrew.kw.w@gmail.com> (raw)
In-Reply-To: <1311565113-5022-1-git-send-email-andrew.kw.w@gmail.com>

This provides a convenient way to inspect the diff while rewording
commits, which is really useful when rewording commit messages that are
unclear.

Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com>
---
 git-rebase--interactive.sh |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index c6ba7c1..df9f7e9 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -392,10 +392,12 @@ do_next () {
 	reword|r)
 		comment_for_reflog reword
 
+		test t = "$verbose" && commit_verbose_flag=--verbose
+
 		mark_action_done
 		pick_one $sha1 ||
 			die_with_patch $sha1 "Could not apply $sha1... $rest"
-		git commit --amend --no-post-rewrite
+		git commit $commit_verbose_flag --amend --no-post-rewrite
 		record_in_rewritten $sha1
 		;;
 	edit|e)
-- 
1.7.2.2

  reply	other threads:[~2011-07-30  7:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-25  3:38 [PATCH 0/2] rebase -i: Some nice-to-have behaviors for "reword" Andrew Wong
2011-07-25  3:38 ` Andrew Wong [this message]
2011-07-25  3:38 ` [PATCH 2/2] rebase -i: interrupt rebase when "commit --amend" failed Andrew Wong
2011-07-30 11:52   ` Sverre Rabbelier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1311565113-5022-2-git-send-email-andrew.kw.w@gmail.com \
    --to=andrew.kw.w@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).