summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2009-08-10 18:22:22 +0200
committerJunio C Hamano <gitster@pobox.com>2009-08-10 14:39:41 -0700
commit0a7f448355f38b8a626ec3c120ad7118690897fe (patch)
tree810c474837571e3d60dfd8774094375efc4a041a
parent28e9cf6512cae1b50a2d2003bb59da4392d99e2e (diff)
downloadgit-0a7f448355f38b8a626ec3c120ad7118690897fe.tar.gz
Correctly mark cover letters' encodings if they are not pure ASCII
If your name is, say, Üwë, you want your cover letters to appear correctly. Convince format-patch to mark it as 8-bit. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin-log.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin-log.c b/builtin-log.c
index 0c2fa0ae2d..1929e0a16c 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -658,6 +658,10 @@ static void make_cover_letter(struct rev_info *rev, int use_stdout,
log_write_email_headers(rev, head, &subject_start, &extra_headers,
&need_8bit_cte);
+ for (i = 0; !need_8bit_cte && i < nr; i++)
+ if (has_non_ascii(list[i]->buffer))
+ need_8bit_cte = 1;
+
msg = body;
pp_user_info(NULL, CMIT_FMT_EMAIL, &sb, committer, DATE_RFC2822,
encoding);