path: root/log-tree.c
diff options
authorEmma Brooks <>2020-04-08 04:31:38 (GMT)
committerJunio C Hamano <>2020-04-08 05:37:18 (GMT)
commit19d097e3d73b4d3635bbe0e8735b2f059d59f29a (patch)
tree46a74286c5a82ccc9805a758ba449d07ad8a767f /log-tree.c
parent9fadedd637b312089337d73c3ed8447e9f0aa775 (diff)
format-patch: teach --no-encode-email-headers
When commit subjects or authors have non-ASCII characters, git format-patch Q-encodes them so they can be safely sent over email. However, if the patch transfer method is something other than email (web review tools, sneakernet), this only serves to make the patch metadata harder to read without first applying it (unless you can decode RFC 2047 in your head). git am as well as some email software supports non-Q-encoded mail as described in RFC 6531. Add --[no-]encode-email-headers and format.encodeEmailHeaders to let the user control this behavior. Signed-off-by: Emma Brooks <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'log-tree.c')
1 files changed, 1 insertions, 0 deletions
diff --git a/log-tree.c b/log-tree.c
index 897a902..0064788 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -693,6 +693,7 @@ void show_log(struct rev_info *opt)
ctx.abbrev = opt->diffopt.abbrev;
ctx.after_subject = extra_headers;
ctx.preserve_subject = opt->preserve_subject;
+ ctx.encode_email_headers = opt->encode_email_headers;
ctx.reflog_info = opt->reflog_info;
ctx.fmt = opt->commit_format;
ctx.mailmap = opt->mailmap;