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

[PATCH] format-patch: page output with --stdout

From
Tay Ray Chuan <rctay89@gmail.com>
Date
Nov 20, 2010, 05:05 UTC
Message-ID
<1290229542-3116-1-git-send-email-rctay89@gmail.com>

Pass output through the pager if format-patch is run with --stdout. This saves the user the trouble of running git with '-p' or piping through a pager.

setup_pager() already checks if stdout is a tty, so we don't have to worry about behaviour if the user redirects/pipes stdout.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
---
 builtin/log.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/builtin/log.c b/builtin/log.c
index d0297a1..c631950 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1159,6 +1159,8 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
 
 	if (!use_stdout)
 		output_directory = set_outdir(prefix, output_directory);
+	else
+		setup_pager();
 
 	if (output_directory) {
 		if (use_stdout)
-- 
1.7.3.2.492.gfc3d1.dirty
Next: Jonathan Nieder
Message 1 of 3 in “format-patch: page output with --stdout”
  1. format-patch: page output with --stdoutTay Ray Chuan, Nov 20, 2010
  2. Jonathan NiederNov 22, 2010
  3. format-patch: page output with --stdoutTay Ray Chuan, Nov 23, 2010

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.