[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, ¬ebuf, get_log_output_encoding(), raw); ctx.notes_message = strbuf_detach(¬ebuf, NULL); base-commit: 683c54c999c301c2cd6f715c411407c413b1d84e
-- 2.30.2