diff options
author | Krzysztof Mazur <krzysiek@podlesie.net> | 2012-10-24 12:03:35 +0400 |
---|---|---|
committer | Jeff King <peff@peff.net> | 2012-10-25 14:04:38 +0400 |
commit | 5637d8573206e8c3d99abacb6b6ca3cf11816202 (patch) | |
tree | ddf154fb6efed55c2f9d73385a40c5de702b4f71 /t/t9001-send-email.sh | |
parent | 4a47a4ddec0d4d37e81ad63385ca287abfe90f9b (diff) |
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 't/t9001-send-email.sh')
-rwxr-xr-x | t/t9001-send-email.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index 89fcedaa33..6c6af7d13f 100755 --- a/t/t9001-send-email.sh +++ b/t/t9001-send-email.sh @@ -1143,6 +1143,23 @@ EOF ' test_expect_success $PREREQ 'setup expect' ' +cat >expected <<EOF +Subject: subject goes here +EOF +' + +test_expect_success $PREREQ 'ASCII subject is not RFC2047 quoted' ' + clean_fake_sendmail && + echo bogus | + git send-email --from=author@example.com --to=nobody@example.com \ + --smtp-server="$(pwd)/fake.sendmail" \ + --8bit-encoding=UTF-8 \ + email-using-8bit >stdout && + grep "Subject" msgtxt1 >actual && + test_cmp expected actual +' + +test_expect_success $PREREQ 'setup expect' ' cat >content-type-decl <<EOF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 |