From f2d06fb13fc93c50067e75768a89db098a3d1809 Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Sun, 8 Jul 2018 22:17:11 +0000 Subject: 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 Signed-off-by: Junio C Hamano --- t/t9001-send-email.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 't') diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index a35cba6a4c..1b474cca28 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 " \ + --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 \ -- cgit v1.2.3