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

Re: [PATCH v2 1/2] pretty: add X-Change-ID to mail formats

From
DDDrew DeVault <drew@ddevault.org>
Date
Jul 6, 2025, 10:41 UTC
Message-ID
<DB4WQTRHWZN3.3VG20AZDK8VN@ddevault.org>
In-Reply-To
<PN3PR01MB9597069B8CF014BFE01B53F3B84CA@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM>
On Sun Jul 6, 2025 at 8:20 AM CEST, Aditya Garg wrote:
Show 6 quoted lines
> I don't think we should add it to email headers. There are many email providers
> which do not allow custom headers in the emails. For example if you are using
> protonmail bridge or any third party protonmail client, the headers are not
> preserved. Similarly, if you are using MS Graph to send emails, headers are
> again not preserved. We should also consider cases when people use Thunderbird,
> Mutt or something similar to send emails, rather than git send-email.

As far as I can tell, this isn't actually true. I looked into it and protonmail and MS Graph both seem to support custom headers. I have also verified that mutt will preserve the header when you edit the email normally with mutt -H. If you're sending an email with Thunderbird, none of these things are preserved (including From, Subject, etc), and the best you can hope for is attaching the patch, in which case X-Change-ID will be preserved unmolested.

Moreover, if the change-id header is lost, it's not the end of the world, it just degrades to the present-day state of affairs, in which you cannot use it to associate patches with prior versions.

> The headers IMO should include the standard ones like From, Subject etc.
> Custom headers should be a part of body, just like we do Signed-off-by, Link etc.

Trailers and headers are different. The main point of the change-id discussion earlier on this list was to avoid adding trailers.

I also suspect that if we added this as an "inbody header" that older git implementations would ingest the X-Change-ID header into the commit message, which is not a desirable behavior.

IMO the right way forward is to use a mail header.
Previous: Aditya GargNext: Junio C Hamano
Message 6 of 17 in “pretty: add X-Change-ID to mail formats”
  1. 1/2 pretty: add X-Change-ID to mail formatsDrew DeVault, Jul 3, 2025
  2. 2/2 am: import X-Change-ID from email headersDrew DeVault, Jul 3, 2025
  3. Jeff KingJul 6, 2025
  4. Drew DeVaultJul 6, 2025
  5. Aditya GargJul 6, 2025
  6. Drew DeVaultJul 6, 2025
  7. Junio C HamanoJul 7, 2025
  8. Junio C HamanoJul 7, 2025
  9. Martin von ZweigbergkJul 7, 2025
  10. Martin von ZweigbergkJul 7, 2025
  11. Junio C HamanoJul 7, 2025
  12. Drew DeVaultJul 7, 2025
  13. Drew DeVaultJul 7, 2025
  14. Remo SenekowitschAug 19, 2025
  15. Drew DeVaultAug 20, 2025
  16. Junio C HamanoAug 21, 2025
  17. Drew DeVaultAug 21, 2025

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.