All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Drew DeVault" <drew@ddevault.org>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: "Aditya Garg" <gargaditya08@live.com>, <git@vger.kernel.org>,
	"Martin von Zweigbergk" <martinvonz@google.com>,
	"Patrick Steinhardt" <ps@pks.im>,
	"Andy Koppe" <andy.koppe@gmail.com>,
	"Remo Senekowitsch" <remo@buenzli.dev>,
	"Jeff King" <peff@peff.net>, "Junio C Hamano" <jch2355@gmail.com>
Subject: Re: [PATCH v2 1/2] pretty: add X-Change-ID to mail formats
Date: Mon, 07 Jul 2025 09:09:34 +0200	[thread overview]
Message-ID: <DB5MUUDPF6C0.3OR02N6JQB8H8@ddevault.org> (raw)
In-Reply-To: <xmqqfrf8ait6.fsf@gitster.g>


[-- Attachment #1.1.1: Type: text/plain, Size: 1530 bytes --]

On Mon Jul 7, 2025 at 3:30 AM CEST, Junio C Hamano wrote:
> I would suggest a lot more generic implementation to solve it once
> and for all.  How about doing it more like this:
>
>    "git format-patch --extra-headers" grabs all extra headers
>    (i.e. those that are not the bog-standard "tree", "parent",
>    "author", "committer") and emit these
>
>     X-git-extra-commit-header: encoding=iso8859-1
>     X-git-extra-commit-header: frotz=nitfol
>
>    next to "Subject:", etc.

+1. I particularly like how this approach throws out a bunch of arguing
over the utility of the specific use-case -- clever :)

Do you think there's any reason not to throw all extra headers into
X-git-extra-commit-header (or whatever) unconditionally? Does it need to
be behind a flag or config option? If some tool added the extra commit
headers, they presumably have a good reason for doing so and we ought to
encode that information so we can reproduce the commit properly, same as
we would with the rest of the commit headers.

I suppose there is a scenario where this breaks something because
someone has a poorly thought-out string munging parser for git
format-patch output that will barf upon encountering the unexpected, or
some mail provider rejects emails rather than silently dropping headers
it doesn't like, but both possibilities seem remote -- especially when
considering that these hypothetical edge cases have to be combined with
a use-case which deploys extra commit headers in the first place.

[-- Attachment #1.2: 42F3F1862E3CC4B8.asc --]
[-- Type: application/pgp-keys, Size: 644 bytes --]

-----BEGIN PGP PUBLIC KEY BLOCK-----

mDMEZ7Y9kxYJKwYBBAHaRw8BAQdA/pPy6X+nNL5T2QaJKEM08xN/Kz7wFTAZoH5Y
riV9x1m0IERyZXcgRGVWYXVsdCA8ZHJld0BkZGV2YXVsdC5vcmc+iJMEExYKADsC
GwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AWIQSftec33CWynY7sRpFC8/GG
LjzEuAUCZ7Y9wwAKCRBC8/GGLjzEuMEEAP9DH+1LgvTqZDLZ8babB5Cdp5y0ZW+Q
Tx78mh1L8jJd6gEAssmgsImcrZv4adP2UW5RU5BHCe9KUdx0DyV83QwlFAS4OARn
tj2TEgorBgEEAZdVAQUBAQdAGAH9dlaCONoXpmQgHoQgYI2tS+VM3mzU8I2PyVYQ
1GUDAQgHiHgEGBYKACACGwwWIQSftec33CWynY7sRpFC8/GGLjzEuAUCZ7Y91gAK
CRBC8/GGLjzEuHcnAP4yjOiM0yqkST6yXzDUWze7B9Im24F8HVx+wNqcDaDtcAD/
fKQhz0SCPiblO6lc7MFUvlaOz2v87UpUYRhzPdgQqwk=
=emrb
-----END PGP PUBLIC KEY BLOCK-----

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  parent reply	other threads:[~2025-07-07  7:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-03 11:29 [PATCH v2 1/2] pretty: add X-Change-ID to mail formats Drew DeVault
2025-07-03 11:29 ` [PATCH v2 2/2] am: import X-Change-ID from email headers Drew DeVault
2025-07-06  3:37 ` [PATCH v2 1/2] pretty: add X-Change-ID to mail formats Jeff King
2025-07-06 10:46   ` Drew DeVault
2025-07-06  6:20 ` Aditya Garg
2025-07-06 10:41   ` Drew DeVault
2025-07-07  1:30     ` Junio C Hamano
2025-07-07  5:53       ` Junio C Hamano
2025-07-07  6:57         ` Martin von Zweigbergk
2025-07-07  6:59           ` Martin von Zweigbergk
2025-07-07 12:40             ` Junio C Hamano
2025-07-07  7:12           ` Drew DeVault
2025-07-07  7:09       ` Drew DeVault [this message]
2025-08-19 17:45 ` Remo Senekowitsch
2025-08-20  7:29   ` Drew DeVault
2025-08-21  0:50     ` Junio C Hamano
2025-08-21  8:52       ` Drew DeVault

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DB5MUUDPF6C0.3OR02N6JQB8H8@ddevault.org \
    --to=drew@ddevault.org \
    --cc=andy.koppe@gmail.com \
    --cc=gargaditya08@live.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jch2355@gmail.com \
    --cc=martinvonz@google.com \
    --cc=peff@peff.net \
    --cc=ps@pks.im \
    --cc=remo@buenzli.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.