path: root/log-tree.c
diff options
authorEric Wong <>2016-06-05 04:46:39 (GMT)
committerJunio C Hamano <>2016-06-06 18:14:14 (GMT)
commit9f23e040615857e3909db51a5420f338c9831b5a (patch)
tree65aab42cd4b6eee9f84382de80f871ff3c3973d1 /log-tree.c
parent6326f199252a1a5fbdea105473f8305d850cdd87 (diff)
pretty: support "mboxrd" output format
This output format prevents format-patch output from breaking readers if somebody copy+pasted an mbox into a commit message. Unlike the traditional "mboxo" format, "mboxrd" is designed to be fully-reversible. "mboxrd" also gracefully degrades to showing extra ">" in existing "mboxo" readers. This degradation is preferable to breaking message splitting completely, a problem I've seen in "mboxcl" due to having multiple, non-existent, or inaccurate Content-Length headers. "mboxcl2" is a non-starter since it's inherits the problems of "mboxcl" while being completely incompatible with existing tooling based around mailsplit. ref: Signed-off-by: Eric Wong <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'log-tree.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/log-tree.c b/log-tree.c
index 78a5381..48daf84 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -603,7 +603,7 @@ void show_log(struct rev_info *opt)
* Print header line of header..
- if (opt->commit_format == CMIT_FMT_EMAIL) {
+ if (cmit_fmt_is_mail(opt->commit_format)) {
log_write_email_headers(opt, commit, &ctx.subject, &extra_headers,
} else if (opt->commit_format != CMIT_FMT_USERFORMAT) {
@@ -694,7 +694,7 @@ void show_log(struct rev_info *opt)
if ((ctx.fmt != CMIT_FMT_USERFORMAT) &&
ctx.notes_message && *ctx.notes_message) {
- if (ctx.fmt == CMIT_FMT_EMAIL) {
+ if (cmit_fmt_is_mail(ctx.fmt)) {
strbuf_addstr(&msgbuf, "---\n");
opt->shown_dashes = 1;