From: Krzysztof Kozlowski <krzk@kernel.org>
To: Matthieu Baerts <matttbe@kernel.org>,
Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Cc: "Kernel.org Tools" <tools@kernel.org>
Subject: Re: [PATCH b4 v2] send: generate patches with --no-mailmap
Date: Thu, 23 Jan 2025 14:07:29 +0100 [thread overview]
Message-ID: <281c2d0b-a04a-4e5b-a5e9-bf5eb080e5e2@kernel.org> (raw)
In-Reply-To: <bb76736a-05ee-4c67-a8bc-626d81838089@kernel.org>
On 23/01/2025 12:04, Matthieu Baerts wrote:
> Hi Konstantin,
>
> On 22/01/2025 17:10, Konstantin Ryabitsev wrote:
>> On Mon, Sep 23, 2024 at 06:04:31PM +0200, Matthieu Baerts (NGI0) wrote:
>>> b4 uses 'git show' to generate patches. By default, this command will
>>> use the mailmap file to convert author and committer names and email
>>> addresses if there is a match.
>>>
>>> That's good to display the last identity when looking at old commits in
>>> the history, but it doesn't sound like a good idea when sending patches.
>>> 'git format-patch' doesn't use the mailmap file, it currently doesn't
>>> even support it, and it is not planned to support it apparently [1].
>>> Note that 'git send-email' might support a new '--mailmap' option, but
>>> it looks like this option will not be enabled by default [2].
>>>
>>> In my case, I had to send some patches, including one from someone else
>>> who has to use the email address from his company, but has an entry in
>>> the mailmap file to his @kernel.org email address. When I sent his
>>> patch, b4 seamlessly converted his email address, and caused checkpatch
>>> to complain, because the From and the SoB entries were different.
>>
>> I've been sitting on this for a bit, simply because I'm 50/50 on whether this
>> is the right thing to do. On the one hand, I see your point, but on the other
>> it seems that if there is a mailmap entry, then the person would probably like
>> to prefer to receive mail at their new address, not at their old one.
>
> Thank you for having looked at this patch!
>
> To me, most of the time, it doesn't make sense to change the 'From'
> field when sending a patch: it might remove attributions, create
> differences when sending patches for stable, incoherences between the
> From and the Signed-off-by, etc.
>
> (In my case, it was not an "old" address, but the owner is not able to
> use it to send emails on the mailing list. Still, his employer asked him
> to keep his email address in the patches he sends. That's why his work
> email is in the mailmap file, even if it is still used in patches, but
> not in the mailing lists.)
>
>> What does everyone else think?
>
> I guess that's a particular case, because I happened to send series
> including such email address :)
I would expect b4 working here exactly like git format-patch, where you
have commit with old identity (mailmapped or not, does not matter) and
resulting git format-patch (with mailmap entry and default arguments)
produces result as:
From: old me
Signed-off-by: old me
Signed-off-by: new me
(with or without final SoB, discussion is not about DCO)
And above is necessary for all cases of changing employers.
So if b4 does not work like this, then this should be either fixed or +1
for this approach.
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-01-23 13:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-23 16:04 [PATCH b4 v2] send: generate patches with --no-mailmap Matthieu Baerts (NGI0)
2025-01-22 16:10 ` Konstantin Ryabitsev
2025-01-23 11:04 ` Matthieu Baerts
2025-01-23 13:07 ` Krzysztof Kozlowski [this message]
2025-01-23 18:04 ` Konstantin Ryabitsev
2025-02-05 15:46 ` Matthieu Baerts
2025-02-05 16:13 ` Konstantin Ryabitsev
2025-02-05 16:29 ` Matthieu Baerts
2025-02-05 20:53 ` Konstantin Ryabitsev
2025-02-06 17:23 ` Matthieu Baerts
2025-02-06 17:47 ` Konstantin Ryabitsev
2025-02-06 17:49 ` Matthieu Baerts
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=281c2d0b-a04a-4e5b-a5e9-bf5eb080e5e2@kernel.org \
--to=krzk@kernel.org \
--cc=konstantin@linuxfoundation.org \
--cc=matttbe@kernel.org \
--cc=tools@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).