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

Bug: format-patch MIME boundary not added to cover letter when attach enabled

From
PHPatrick Hemmer <git@stormcloud9.net>
Date
Apr 30, 2018, 01:40 UTC
Message-ID
<5e409069-835f-3c85-f55e-c27f534dc9e2@stormcloud9.net>

When you use `git format-patch --cover-letter --attach`, the cover letter does not have the trailing MIME boundary. RFC2046 states that the last part must be followed by a closing boundary. This causes some email clients (Thunderbird in my case) to discard the message body. This is experienced with git 2.16.3.

For example:

$ git format-patch --cover-letter --attach --root -o /tmp/out /tmp/out/0000-cover-letter.patch /tmp/out/0001-hello-world.patch

$ cat /tmp/out/0000-cover-letter.patch
From a25ac88e6216131e8b000335d32bb99d4e5185ac Mon Sep 17 00:00:00 2001
From: Patrick Hemmer <git@stormcloud9.net>
Date: Sun, 29 Apr 2018 21:26:45 -0400
Subject: [PATCH 0/1] *** SUBJECT HERE ***
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------2.16.3"
This is a multi-part message in MIME format.
--------------2.16.3
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
*** BLURB HERE ***
Patrick Hemmer (1):
  hello world
-- 
2.16.3
Next: brian m. carlson
Message 1 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.