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

Re: [PATCH v2] format-patch: fix From header in cover letter

From
Mirko Faina <mroik@delayed.space>
Date
Feb 17, 2026, 21:30 UTC
Message-ID
<aZTcsow2QtBpRiJd@exploit>
On Tue, Feb 17, 2026 at 07:22:08AM +0100, Patrick Steinhardt wrote:
Show 12 quoted lines
> One thing that made me stop though is the folowing sentence in
> git-format-patch(1):
> 
>   Use ident in the From: header of each commit email.
> 
> The option explicitly mentions that we use "--from" for the commit
> emails, only, and that may be read as implying that it's not used for
> the cover letter.
> 
> I don't really know whether that wording is intentional, and I cannot
> come up with a good reason why it should be. But I'd say that the
> wording is something we should adjust.

I don't think any user would reasonably think that it wouldn't apply to the cover letter as you're sending the whole patch series in bulk, as the same person.

I will change the documentation to remove any ambiguity.
Show 12 quoted lines
> We're not only testing the cover letter here though, but also the other
> generated patch. This makes it somewhat hard to verify that the test
> actually works as expected. Would it make sense to maybe use something
> like the following instead?
> 
>   test_expect_success '--from applies to cover letter' '
>   	test_when_finished "rm -rf patches" &&
>   	git format-patch -1 --cover-letter --from="Foo Bar <author@example.com>" -o patches &&
>   	echo "From: Foo Bar <author@example.com>" >expect &&
>   	grep "^From:" patches/0000-cover-letter.patch >patch.head &&
>   	test_cmp expect patch.head
>   '

Yes, makes sense, wouldn't want to generate a false negative on the compliance of the "--from" option. I will apply the suggested change.

Thank you
Message 1 of 1 in “Re: [PATCH v2] format-patch: fix From header in cover letter”
  1. Mirko FainaFeb 17, 2026

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.