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

Re: In-body from headers ignored

From
LBLiam Breck <liam@networkimprov.net>
Date
Feb 6, 2017, 00:08 UTC
Message-ID
<CAKvHMgTDVU+=uq7_oQzfnSNxhFPd75-Ah4BXOcRnZCgUwytPWA@mail.gmail.com>
In-Reply-To
<xmqqa8a0431z.fsf@gitster.mtv.corp.google.com>
On Sun, Feb 5, 2017 at 3:43 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 21 quoted lines
> Liam Breck <liam@networkimprov.net> writes:
>
>> git format-patch & send-email generate the in-body From header.
>>
>> git am recognizes it.
>>
>> git commit & format-patch & send-email ignore it. (The latter two will
>> add a new header above an extant one.) Is there a rationale for this?
>
> I may be misunderstanding you, but I am guessing that you are
> expecting
>...
> and seeing that the real author is still you, the title is "The real
> title of the patch", and the first paragraph of the body consists of
> these two lines that begin with "From: and "Subject:".
>
> This is very much deliberate.  "git commit" does not care if the
> second paragraph in the body of the message resembles e-mail
> headers, because it is a command that can be used by people who do
> not even e-mail patches.
> ...
Hi, thanks for the detailed reply :-)
OK, that resolves my Q about git commit.

But should not git format-patch & send-email detect an extant in-body From or Subject header?

Suppose I need to forward a patchset and cannot amend the commits in git? Or that a patchset author is not the copyright holder, whom I want to be logged as the author upstream?

There is a workaround: delete the From headers in the patches, but I was looking for a command-line option or alternate default behavior :-)

Previous: Junio C Hamano
Message 3 of 3 in “In-body from headers ignored”
  1. Liam BreckFeb 5, 2017
  2. Junio C HamanoFeb 5, 2017
  3. Liam BreckFeb 6, 2017

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.