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

[PATCH] fmt-patch: output file names to stdout

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
May 5, 2006, 01:33 UTC
Message-ID
<Pine.LNX.4.63.0605050332450.25591@wbgn013.biozentrum.uni-wuerzburg.de>
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 builtin-log.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/builtin-log.c b/builtin-log.c
index 576703c..1649f49 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -75,6 +75,8 @@ static int istitlechar(char c)
 		(c >= '0' && c <= '9') || c == '.' || c == '_';
 }
 
+static FILE *realstdout = NULL;
+
 static void reopen_stdout(struct commit *commit, int nr)
 {
 	char filename[1024];
@@ -117,7 +119,7 @@ static void reopen_stdout(struct commit 
 			len--;
 	}
 	strcpy(filename + len, ".txt");
-	fprintf(stderr, "%s\n", filename);
+	fprintf(realstdout, "%s\n", filename);
 	freopen(filename, "w", stdout);
 }
 
@@ -149,6 +151,9 @@ int cmd_format_patch(int argc, const cha
 		argv++;
 	}
 
+	if (!use_stdout)
+		realstdout = fdopen(dup(1), "w");
+
 	prepare_revision_walk(&rev);
 	while ((commit = get_revision(&rev)) != NULL) {
 		/* ignore merges */
-- 
1.3.1.g6d0e-dirty
Message 1 of 1 in “fmt-patch: output file names to stdout”
  1. fmt-patch: output file names to stdoutJohannes Schindelin, May 5, 2006

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.