summaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorKrzysztof Mazur <krzysiek@podlesie.net>2012-10-24 10:03:35 +0200
committerJeff King <peff@peff.net>2012-10-25 06:04:38 -0400
commit5637d8573206e8c3d99abacb6b6ca3cf11816202 (patch)
treeddf154fb6efed55c2f9d73385a40c5de702b4f71 /git-send-email.perl
parent4a47a4ddec0d4d37e81ad63385ca287abfe90f9b (diff)
downloadgit-5637d8573206e8c3d99abacb6b6ca3cf11816202.tar.gz
git-send-email: skip RFC2047 quoting for ASCII subjects
The git-send-email always use RFC2047 subject quoting for files with "broken" encoding - non-ASCII files without Content-Transfer-Encoding, even for ASCII subjects. This is harmless but unnecessarily ugly for people reading the raw headers. This patch skips rfc2047 quoting when the subject does not need it. Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net> Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index adcb4e397b..efeae4c47a 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -1327,7 +1327,8 @@ foreach my $t (@files) {
$body_encoding = $auto_8bit_encoding;
}
- if ($broken_encoding{$t} && !is_rfc2047_quoted($subject)) {
+ if ($broken_encoding{$t} && !is_rfc2047_quoted($subject) &&
+ ($subject =~ /[^[:ascii:]]/)) {
$subject = quote_rfc2047($subject, $auto_8bit_encoding);
}