git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] format-patch: make cover letters always text/plain

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
May 2, 2018, 00:16 UTC
Message-ID
<20180502001606.GI13217@genre.crustytoothpaste.net>
In-Reply-To
<CAPig+cRucJfzm8Z0XhPa0CMw+LiBdY_b5=bMz0LkezJxvC9qJA@mail.gmail.com>
On Mon, Apr 30, 2018 at 09:53:33PM -0400, Eric Sunshine wrote:
Show 22 quoted lines
> 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.

Sure, I can reroll with that change. I had considered doing that, but decided against it. I hadn't thought of resilience against a failed git format-patch, though.

-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Previous: Eric SunshineNext: brian m. carlson
Message 7 of 8 in “Bug: format-patch MIME boundary not added to cover letter when attach enabled”
  1. Patrick HemmerApr 30, 2018
  2. brian m. carlsonApr 30, 2018
  3. Junio C HamanoApr 30, 2018
  4. brian m. carlsonApr 30, 2018
  5. format-patch: make cover letters always text/plainbrian m. carlson, May 1, 2018
  6. Eric SunshineMay 1, 2018
  7. brian m. carlsonMay 2, 2018
  8. format-patch: make cover letters always text/plainbrian m. carlson, May 2, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.