Re: [PATCH 1/3] send-email: add an auto option for transfer encoding
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Jul 6, 2018, 06:01 UTC
- Message-ID
- <CAPig+cR7tWw7D8JMg1a9G2Jgi=HQj3YZjCn+tHDNjDEsrfSLqg@mail.gmail.com>
- In-Reply-To
- <20180706022357.739657-2-sandals@crustytoothpaste.net>
On Thu, Jul 5, 2018 at 10:24 PM brian m. carlson <sandals@crustytoothpaste.net> wrote:
Show 17 quoted lines
> For most patches, using a transfer encoding of 8bit provides good
> compatibility with most servers and makes it as easy as possible to view
> patches. However, there are some patches for which 8bit is not a valid
> encoding: RFC 5321 specifies that a message must not have lines
> exceeding 998 octets.
>
> Add a transfer encoding value, auto, which indicates that a patch should
> use 8bit where allowed and quoted-printable otherwise. Choose
> quoted-printable instead of base64, since base64-encoded plain text is
> treated as suspicious by some spam filters.
>
> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
> ---
> diff --git a/git-send-email.perl b/git-send-email.perl
> @@ -1852,13 +1851,16 @@ sub apply_transfer_encoding {
> + $to = ($message =~ /.{999,}/) ? 'quoted-printable' :'8bit'
> + if $to eq 'auto';Style: space after colon: 'quoted-printable' : '8bit'
Show 11 quoted lines
> diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh > +test_expect_success $PREREQ 'long lines with auto encoding are quoted-printable' ' > + clean_fake_sendmail && > + git send-email \ > + --from="Example <nobody@example.com>" \ > + --to=nobody@example.com \ > + --smtp-server="$(pwd)/fake.sendmail" \ > + --transfer-encoding=auto \ > + --no-validate \ > + longline.patch \ > + 2>errors &&
Why capture stderr to a file then ignore the file?
> + grep "Content-Transfer-Encoding: quoted-printable" msgtxt1 > +'