[PATCH 1/2] rebase -i: run "commit --amend" with verbose if rebase was called with -v

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]