Re: In-body from headers ignored
- From
- Liam 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 :-)