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

[PATCH] format-patch: use raw format for notes

From
Tuomas Ahola <taahol@utu.fi>
Date
Mar 18, 2025, 18:02 UTC
Message-ID
<20250318180251.3712-1-taahol@utu.fi>

The default formatting of commit notes by git format-patch --notes doesn't make a very good fit. It would be more beneficial to use the raw format for CMIT_FMT_EMAIL and CMIT_FMT_MBOXRD.

Signed-off-by: Tuomas Ahola <taahol@utu.fi>
---
 log-tree.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/log-tree.c b/log-tree.c
index 8b184d6776..c40a7599d0 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -857,7 +857,9 @@ void show_log(struct rev_info *opt)
 		int raw;
 		struct strbuf notebuf = STRBUF_INIT;
 
-		raw = (opt->commit_format == CMIT_FMT_USERFORMAT);
+		raw = (opt->commit_format == CMIT_FMT_USERFORMAT ||
+		       opt->commit_format == CMIT_FMT_EMAIL ||
+		       opt->commit_format == CMIT_FMT_MBOXRD);
 		format_display_notes(&commit->object.oid, &notebuf,
 				     get_log_output_encoding(), raw);
 		ctx.notes_message = strbuf_detach(&notebuf, NULL);

base-commit: 683c54c999c301c2cd6f715c411407c413b1d84e
-- 
2.30.2
Next: brian m. carlson
Message 1 of 5 in “format-patch: use raw format for notes”
  1. format-patch: use raw format for notesTuomas Ahola, Mar 18, 2025
  2. brian m. carlsonMar 18, 2025
  3. Junio C HamanoMar 18, 2025
  4. Tuomas AholaMar 18, 2025
  5. Junio C HamanoMar 19, 2025

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.