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

Re: Problem with "From:" line on "git format-patch" generated patches

From
Jeff King <peff@peff.net>
Date
Nov 4, 2009, 08:49 UTC
Message-ID
<20091104084903.GA1137@coredump.intra.peff.net>
In-Reply-To
<b8bf37780911031006q4bc4c487xd9db86eb0fa531e7@mail.gmail.com>
On Tue, Nov 03, 2009 at 04:06:39PM -0200, André Goddard Rosa wrote:
Show 9 quoted lines
> I'm not using any specific tool for inputting the git-format-patch,
> but instead I'm sending the files generated by it through gmail as an
> inlined patch in the email body.
> 
> I like the convenience of format-patch for generating the patch files,
> but in this case, formatting the header as rfc2047 is not necessary
> and makes a funny/garbled output in my patch submission.
> 
> Do you have a suggestion for my workflow?

I don't think there's currently a way to turn off the rfc2047 from within format-patch. You can generate a single patch with the same format using:

  git log -1 -p --stat --summary \
    --pretty=tformat:'From: %an <%ae>%nDate: %aD%nSubject: [PATCH] %s%n%n%b'
but it won't do nice things like putting one patch in each file.

Probably it would make sense for format-patch to have an option to indicate that you are going to inline these patches into a different MUA. So drop the 'From' mbox header line, don't rfc2047 encode, and maybe some other behaviors. I do the same thing (including inline in mutt), but I just delete the unwanted lines manually, and fortunately my name doesn't contain any non-ascii characters. ;)

-Peff
Previous: André Goddard RosaNext: André Goddard Rosa
Message 7 of 8 in “Problem with "From:" line on "git format-patch" generated patches”
  1. André Goddard RosaNov 3, 2009
  2. Santi BéjarNov 3, 2009
  3. André Goddard RosaNov 3, 2009
  4. André Goddard RosaNov 3, 2009
  5. Jonathan NiederNov 3, 2009
  6. André Goddard RosaNov 4, 2009
  7. Jeff KingNov 4, 2009
  8. André Goddard RosaNov 4, 2009

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.