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

[PATCH] rebase -i: fix overzealous output redirection

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 26, 2007, 06:35 UTC
Message-ID
<Pine.LNX.4.64.0707260735150.14781@racer.site>

When squashing, you no longer saw what the editor had to say to you after commit 'Shut "git rebase -i" up when no --verbose was given' (if you used a console based editor, at least).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
	This bit me real hard when cleaning up the work-tree patch
	series.
 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 93289c0..9a88335 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -250,10 +250,12 @@ do_next () {
 		case "$(peek_next_command)" in
 		squash)
 			EDIT_COMMIT=
+			USE_OUTPUT=output
 			cp "$MSG" "$SQUASH_MSG"
 		;;
 		*)
 			EDIT_COMMIT=-e
+			USE_OUTPUT=
 			test -f "$SQUASH_MSG" && rm "$SQUASH_MSG"
 		esac
 
@@ -267,7 +269,7 @@ do_next () {
 			# This is like --amend, but with a different message
 			eval "$author_script"
 			export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_AUTHOR_DATE
-			output git commit -F "$MSG" $EDIT_COMMIT
+			$USE_OUTPUT git commit -F "$MSG" $EDIT_COMMIT
 			;;
 		t)
 			cp "$MSG" "$GIT_DIR"/MERGE_MSG
-- 
1.5.3.rc2.42.gda8d-dirty
Next: Junio C Hamano
Message 1 of 3 in “rebase -i: fix overzealous output redirection”
  1. rebase -i: fix overzealous output redirectionJohannes Schindelin, Jul 26, 2007
  2. Junio C HamanoJul 26, 2007
  3. Johannes SchindelinJul 26, 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.