git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/3] rebase -i: actually show the diffstat when being verbose

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 8, 2007, 02:02 UTC
Message-ID
<Pine.LNX.4.64.0707080301460.4093@racer.site>

The "while" loop in the function do_rest is not supposed to ever be exited. Instead, the function do_one checks if there is nothing left, and cleans up and exits if that is the case. So the diffstat code belongs there.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 git-rebase--interactive.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 67f2ee2..84148a9 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -239,7 +239,10 @@ do_next () {
 	fi &&
 	message="$GIT_REFLOG_ACTION: $HEADNAME onto $SHORTONTO)" &&
 	git update-ref -m "$message" $HEADNAME $NEWHEAD $OLDHEAD &&
-	git symbolic-ref HEAD $HEADNAME &&
+	git symbolic-ref HEAD $HEADNAME && {
+		test ! -f "$DOTEST"/verbose ||
+			git diff --stat $(cat "$DOTEST"/head)..HEAD
+	} &&
 	rm -rf "$DOTEST" &&
 	warn "Successfully rebased and updated $HEADNAME."
 
@@ -251,9 +254,6 @@ do_rest () {
 	do
 		do_next
 	done
-	test -f "$DOTEST"/verbose &&
-		git diff --stat $(cat "$DOTEST"/head)..HEAD
-	exit
 }
 
 while case $# in 0) break ;; esac
-- 
1.5.3.rc0.2712.g125b7f
Message 1 of 1 in “rebase -i: actually show the diffstat when being verbose”
  1. 2/3 rebase -i: actually show the diffstat when being verboseJohannes Schindelin, Jul 8, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.