From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
To: "Kernel.org Tools" <tools@kernel.org>
Cc: Konstantin Ryabitsev <konstantin@linuxfoundation.org>,
"Matthieu Baerts (NGI0)" <matttbe@kernel.org>
Subject: [PATCH b4 v2] send: generate patches with --no-mailmap
Date: Mon, 23 Sep 2024 18:04:31 +0200 [thread overview]
Message-ID: <20240923-send-mailmap-v2-1-e2c62f1de79b@kernel.org> (raw)
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.
Here, we ensure the conversion is not done, to avoid any surprise once
the emails are sent.
Link: https://lore.kernel.org/all/20240813-jk-support-mailmap-git-format-patch-v1-1-1aea690ea5dd@gmail.com/ [1]
Link: https://lore.kernel.org/all/20240827-jk-send-email-mailmap-support-v3-0-bec5ba9be391@gmail.com/ [2]
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Changes in v2:
- Rebased and resolved conflicts.
- Link to v1: https://patch.msgid.link/20240820-send-mailmap-v1-1-7f35789be4b1@kernel.org
---
src/b4/__init__.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/b4/__init__.py b/src/b4/__init__.py
index 811bbcaf028d78224242433eac9fdbeb03a306b3..a650d114bcc1d0fb534fda3735101458062a8386 100644
--- a/src/b4/__init__.py
+++ b/src/b4/__init__.py
@@ -3463,6 +3463,7 @@ def git_range_to_patches(gitdir: Optional[str], start: str, end: str,
'--binary',
'--patch-with-stat',
'--encoding=utf-8',
+ '--no-mailmap',
commit,
],
decode=False,
---
base-commit: dedf88cb947bab87c418b49d975df11f83621692
change-id: 20240820-send-mailmap-ef8ba398450f
Best regards,
--
Matthieu Baerts (NGI0) <matttbe@kernel.org>
next reply other threads:[~2024-09-23 16:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-23 16:04 Matthieu Baerts (NGI0) [this message]
2025-01-22 16:10 ` [PATCH b4 v2] send: generate patches with --no-mailmap Konstantin Ryabitsev
2025-01-23 11:04 ` Matthieu Baerts
2025-01-23 13:07 ` Krzysztof Kozlowski
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=20240923-send-mailmap-v2-1-e2c62f1de79b@kernel.org \
--to=matttbe@kernel.org \
--cc=konstantin@linuxfoundation.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).