summaryrefslogtreecommitdiff
path: root/t/t9001-send-email.sh
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2018-07-08 22:17:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-07-09 17:55:12 (GMT)
commitf2d06fb13fc93c50067e75768a89db098a3d1809 (patch)
treef8225193ba4fd3f1a671f126a9dfadfb5adbca7f /t/t9001-send-email.sh
parent7a36987ffffa59052723ed7299c1de25bc18048a (diff)
downloadgit-f2d06fb13fc93c50067e75768a89db098a3d1809.zip
git-f2d06fb13fc93c50067e75768a89db098a3d1809.tar.gz
git-f2d06fb13fc93c50067e75768a89db098a3d1809.tar.bz2
send-email: accept long lines with suitable transfer encoding
With --validate (which is the default), we warn about lines exceeding 998 characters due to the limits specified in RFC 5322. However, if we're using a suitable transfer encoding (quoted-printable or base64), we're guaranteed not to have lines exceeding 76 characters, so there's no need to fail in this case. The auto transfer encoding handles this specific case, so accept it as well. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9001-send-email.sh')
-rwxr-xr-xt/t9001-send-email.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index a35cba6..1b474cc 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -479,6 +479,19 @@ test_expect_success $PREREQ 'long lines with auto encoding are quoted-printable'
grep "Content-Transfer-Encoding: quoted-printable" msgtxt1
'
+for enc in auto quoted-printable base64
+do
+ test_expect_success $PREREQ "--validate passes with encoding $enc" '
+ git send-email \
+ --from="Example <nobody@example.com>" \
+ --to=nobody@example.com \
+ --smtp-server="$(pwd)/fake.sendmail" \
+ --transfer-encoding=$enc \
+ --validate \
+ $patches longline.patch
+ '
+done
+
test_expect_success $PREREQ 'Invalid In-Reply-To' '
clean_fake_sendmail &&
git send-email \