summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorEmma Brooks <me@pluvano.com>2020-04-08 04:31:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-04-08 05:37:18 (GMT)
commit19d097e3d73b4d3635bbe0e8735b2f059d59f29a (patch)
tree46a74286c5a82ccc9805a758ba449d07ad8a767f /revision.c
parent9fadedd637b312089337d73c3ed8447e9f0aa775 (diff)
downloadgit-19d097e3d73b4d3635bbe0e8735b2f059d59f29a.zip
git-19d097e3d73b4d3635bbe0e8735b2f059d59f29a.tar.gz
git-19d097e3d73b4d3635bbe0e8735b2f059d59f29a.tar.bz2
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 <me@pluvano.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/revision.c b/revision.c
index 8136929..58f5826 100644
--- a/revision.c
+++ b/revision.c
@@ -2241,6 +2241,10 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
revs->topo_order = 1;
revs->rewrite_parents = 1;
revs->graph = graph_init(revs);
+ } else if (!strcmp(arg, "--encode-email-headers")) {
+ revs->encode_email_headers = 1;
+ } else if (!strcmp(arg, "--no-encode-email-headers")) {
+ revs->encode_email_headers = 0;
} else if (!strcmp(arg, "--root")) {
revs->show_root_diff = 1;
} else if (!strcmp(arg, "--no-commit-id")) {