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>
This commit is contained in:
committed by
Junio C Hamano
parent
9fadedd637
commit
19d097e3d7
@ -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")) {
|
||||
|
||||
Reference in New Issue
Block a user