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

[PATCH v4 2/6] Output the graph columns at the end of the commit message

From
Bo Yang <struggleyb.nku@gmail.com>
Date
May 26, 2010, 07:08 UTC
Message-ID
<1274857687-10514-2-git-send-email-struggleyb.nku@gmail.com>
In-Reply-To
<1274857687-10514-1-git-send-email-struggleyb.nku@gmail.com>

There is an empty line between the commit message and the diff output. Add the graph columns as prefix of this line.

Signed-off-by: Bo Yang <struggleyb.nku@gmail.com>
---
 log-tree.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/log-tree.c b/log-tree.c
index d3ae969..2e2be7c 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -469,6 +469,12 @@ int log_tree_diff_flush(struct rev_info *opt)
 			int pch = DIFF_FORMAT_DIFFSTAT | DIFF_FORMAT_PATCH;
 			if ((pch & opt->diffopt.output_format) == pch)
 				printf("---");
+			if (opt->diffopt.output_prefix) {
+				struct strbuf *msg = NULL;
+				msg = opt->diffopt.output_prefix(&opt->diffopt,
+					opt->diffopt.output_prefix_data);
+				fwrite(msg->buf, msg->len, 1, stdout);
+			}
 			putchar('\n');
 		}
 	}
-- 
1.6.0.4
Previous: Bo Yang
Message 2 of 2 in “Add a prefix output callback to diff output”
  1. 1/6 Add a prefix output callback to diff outputBo Yang, May 26, 2010
  2. 2/6 Output the graph columns at the end of the commit messageBo Yang, May 26, 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.