git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: Git List <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>,
	Patrick Hemmer <git@stormcloud9.net>
Subject: Re: [PATCH] format-patch: make cover letters always text/plain
Date: Mon, 30 Apr 2018 21:53:33 -0400	[thread overview]
Message-ID: <CAPig+cRucJfzm8Z0XhPa0CMw+LiBdY_b5=bMz0LkezJxvC9qJA@mail.gmail.com> (raw)
In-Reply-To: <20180501000214.833766-1-sandals@crustytoothpaste.net>

On Mon, Apr 30, 2018 at 8:02 PM, brian m. carlson
<sandals@crustytoothpaste.net> wrote:
> When formatting a series of patches using --attach and --cover-letter,
> the cover letter lacks the closing MIME boundary, violating RFC 2046.
> Certain clients, such as Thunderbird, discard the message body in such a
> case.
>
> Since the cover letter is just one part and sending it as
> multipart/mixed is not very useful, always emit it as text/plain,
> avoiding the boundary problem altogether.
>
> Reported-by: Patrick Hemmer <git@stormcloud9.net>
> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
> ---
> diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
> @@ -1661,6 +1661,15 @@ test_expect_success 'format-patch --base with --attach' '
> +test_expect_success 'format-patch --attach cover-letter only is non-multipart' '
> +       test_when_finished "rm -r patches" &&
> +       git format-patch -o patches --cover-letter --attach=mimemime --base=HEAD~ -1 &&

Nit: "rm -rf" would be a bit more robust against git-format-patch
somehow crashing before creating the "patches" directory.

> +       ! egrep "^--+mimemime" patches/0000*.patch &&
> +       egrep "^--+mimemime$" patches/0001*.patch >output &&
> +       test_line_count = 2 output &&
> +       egrep "^--+mimemime--$" patches/0001*.patch >output &&
> +       test_line_count = 1 output
> +'

  reply	other threads:[~2018-05-01  1:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-30  1:40 Bug: format-patch MIME boundary not added to cover letter when attach enabled Patrick Hemmer
2018-04-30  2:09 ` brian m. carlson
2018-04-30  3:30   ` Junio C Hamano
2018-04-30 11:59     ` brian m. carlson
2018-05-01  0:02   ` [PATCH] format-patch: make cover letters always text/plain brian m. carlson
2018-05-01  1:53     ` Eric Sunshine [this message]
2018-05-02  0:16       ` brian m. carlson
2018-05-02  2:20     ` [PATCH v2] " brian m. carlson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPig+cRucJfzm8Z0XhPa0CMw+LiBdY_b5=bMz0LkezJxvC9qJA@mail.gmail.com' \
    --to=sunshine@sunshineco.com \
    --cc=git@stormcloud9.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sandals@crustytoothpaste.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).