* [PATCH 0/3] BaseTools/Scripts: .mailmap improvements
@ 2020-02-04 22:49 Philippe Mathieu-Daudé
2020-02-04 22:49 ` [PATCH 1/3] BaseTools/Scripts/PatchCheck.py: Do not use mailmap Philippe Mathieu-Daudé
` (5 more replies)
0 siblings, 6 replies; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-04 22:49 UTC (permalink / raw)
To: devel; +Cc: Philippe Mathieu-Daude, Bob Feng, Liming Gao
Hi,
This series improves PatchCheck.py so Mergify can catch
the emails rewritten by the mailing list.
Also it enable mailmap usage by default in the git config.
Regards,
Phil.
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Philippe Mathieu-Daudé (3):
BaseTools/Scripts/PatchCheck.py: Do not use mailmap
BaseTools/Scripts/PatchCheck.py: Detect emails rewritten by Groups.Io
BaseTools/Scripts: Add log.mailmap to SetupGit.py
BaseTools/Scripts/PatchCheck.py | 10 ++++++++--
BaseTools/Scripts/SetupGit.py | 1 +
2 files changed, 9 insertions(+), 2 deletions(-)
--
2.21.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] BaseTools/Scripts/PatchCheck.py: Do not use mailmap
2020-02-04 22:49 [PATCH 0/3] BaseTools/Scripts: .mailmap improvements Philippe Mathieu-Daudé
@ 2020-02-04 22:49 ` Philippe Mathieu-Daudé
2020-02-04 22:49 ` [PATCH 2/3] BaseTools/Scripts/PatchCheck.py: Detect emails rewritten by Groups.Io Philippe Mathieu-Daudé
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-04 22:49 UTC (permalink / raw)
To: devel; +Cc: Philippe Mathieu-Daudé, Bob Feng, Liming Gao
From: Philippe Mathieu-Daudé <philmd@redhat.com>
We check the author/committer name/email are properly displayed
since commits 8ffa47fb3ab..c0328cf3803. However if PatchCheck.py
uses the mailmap, it will check sanitized names/emails.
Use the --no-use-mailmap option so PatchCheck.py will check
unsanitized input.
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com>
---
BaseTools/Scripts/PatchCheck.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py
index 6823cc69bb9f..07881abaf64e 100755
--- a/BaseTools/Scripts/PatchCheck.py
+++ b/BaseTools/Scripts/PatchCheck.py
@@ -643,11 +643,13 @@ class CheckGitCommits:
def read_patch_from_git(self, commit):
# Run git to get the commit patch
- return self.run_git('show', '--pretty=email', '--no-textconv', commit)
+ return self.run_git('show', '--pretty=email', '--no-textconv',
+ '--no-use-mailmap', commit)
def read_committer_email_address_from_git(self, commit):
# Run git to get the committer email
- return self.run_git('show', '--pretty=%cn <%ce>', '--no-patch', commit)
+ return self.run_git('show', '--pretty=%cn <%ce>', '--no-patch',
+ '--no-use-mailmap', commit)
def run_git(self, *args):
cmd = [ 'git' ]
--
2.21.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] BaseTools/Scripts/PatchCheck.py: Detect emails rewritten by Groups.Io
2020-02-04 22:49 [PATCH 0/3] BaseTools/Scripts: .mailmap improvements Philippe Mathieu-Daudé
2020-02-04 22:49 ` [PATCH 1/3] BaseTools/Scripts/PatchCheck.py: Do not use mailmap Philippe Mathieu-Daudé
@ 2020-02-04 22:49 ` Philippe Mathieu-Daudé
2020-02-04 22:49 ` [PATCH 3/3] BaseTools/Scripts: Add log.mailmap to SetupGit.py Philippe Mathieu-Daudé
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-04 22:49 UTC (permalink / raw)
To: devel; +Cc: Philippe Mathieu-Daudé, Bob Feng, Liming Gao
From: Philippe Mathieu-Daudé <philmd@redhat.com>
Due to strict DMARC / DKIM / SPF rules, Groups.Io sometimes rewrite
the author email. See for example commit df851da3ceff5b6bcf5e12616.
Add a check to detect these rewrites with PatchCheck.py.
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com>
---
BaseTools/Scripts/PatchCheck.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py
index 07881abaf64e..13da6967785d 100755
--- a/BaseTools/Scripts/PatchCheck.py
+++ b/BaseTools/Scripts/PatchCheck.py
@@ -79,6 +79,10 @@ class EmailAddressCheck:
self.error("The email address cannot contain a space: " +
mo.group(3))
+ if ' via Groups.Io' in name and mo.group(3).endswith('@groups.io'):
+ self.error("Email rewritten by lists DMARC / DKIM / SPF: " +
+ email)
+
class CommitMessageCheck:
"""Checks the contents of a git commit message."""
--
2.21.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] BaseTools/Scripts: Add log.mailmap to SetupGit.py
2020-02-04 22:49 [PATCH 0/3] BaseTools/Scripts: .mailmap improvements Philippe Mathieu-Daudé
2020-02-04 22:49 ` [PATCH 1/3] BaseTools/Scripts/PatchCheck.py: Do not use mailmap Philippe Mathieu-Daudé
2020-02-04 22:49 ` [PATCH 2/3] BaseTools/Scripts/PatchCheck.py: Detect emails rewritten by Groups.Io Philippe Mathieu-Daudé
@ 2020-02-04 22:49 ` Philippe Mathieu-Daudé
2020-02-04 23:19 ` [edk2-devel] [PATCH 0/3] BaseTools/Scripts: .mailmap improvements Laszlo Ersek
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-04 22:49 UTC (permalink / raw)
To: devel; +Cc: Philippe Mathieu-Daudé, Bob Feng, Liming Gao
From: Philippe Mathieu-Daudé <philmd@redhat.com>
We added .mailmap to the repository in commit 4a1aeca3bd02d04e01c2d
to display commit mistakes fixed. Use this option by default in our
git setup.
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com>
---
BaseTools/Scripts/SetupGit.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/BaseTools/Scripts/SetupGit.py b/BaseTools/Scripts/SetupGit.py
index 514f1c4d42d4..e320ba2f887e 100644
--- a/BaseTools/Scripts/SetupGit.py
+++ b/BaseTools/Scripts/SetupGit.py
@@ -74,6 +74,7 @@ OPTIONS = [
{'section': 'format', 'option': 'coverLetter', 'value': True},
{'section': 'format', 'option': 'numbered', 'value': True},
{'section': 'format', 'option': 'signoff', 'value': False},
+ {'section': 'log', 'option': 'mailmap', 'value': True},
{'section': 'notes', 'option': 'rewriteRef', 'value': 'refs/notes/commits'},
{'section': 'sendemail', 'option': 'chainreplyto', 'value': False},
{'section': 'sendemail', 'option': 'thread', 'value': True},
--
2.21.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [edk2-devel] [PATCH 0/3] BaseTools/Scripts: .mailmap improvements
2020-02-04 22:49 [PATCH 0/3] BaseTools/Scripts: .mailmap improvements Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2020-02-04 22:49 ` [PATCH 3/3] BaseTools/Scripts: Add log.mailmap to SetupGit.py Philippe Mathieu-Daudé
@ 2020-02-04 23:19 ` Laszlo Ersek
2020-02-05 13:47 ` Bob Feng
[not found] ` <15F085AE91AD138D.27054@groups.io>
5 siblings, 0 replies; 8+ messages in thread
From: Laszlo Ersek @ 2020-02-04 23:19 UTC (permalink / raw)
To: devel, philmd; +Cc: Bob Feng, Liming Gao
On 02/04/20 23:49, Philippe Mathieu-Daudé wrote:
> Hi,
>
> This series improves PatchCheck.py so Mergify can catch
> the emails rewritten by the mailing list.
> Also it enable mailmap usage by default in the git config.
>
> Regards,
>
> Phil.
>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
>
> Philippe Mathieu-Daudé (3):
> BaseTools/Scripts/PatchCheck.py: Do not use mailmap
> BaseTools/Scripts/PatchCheck.py: Detect emails rewritten by Groups.Io
> BaseTools/Scripts: Add log.mailmap to SetupGit.py
>
> BaseTools/Scripts/PatchCheck.py | 10 ++++++++--
> BaseTools/Scripts/SetupGit.py | 1 +
> 2 files changed, 9 insertions(+), 2 deletions(-)
>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] BaseTools/Scripts: .mailmap improvements
2020-02-04 22:49 [PATCH 0/3] BaseTools/Scripts: .mailmap improvements Philippe Mathieu-Daudé
` (3 preceding siblings ...)
2020-02-04 23:19 ` [edk2-devel] [PATCH 0/3] BaseTools/Scripts: .mailmap improvements Laszlo Ersek
@ 2020-02-05 13:47 ` Bob Feng
[not found] ` <15F085AE91AD138D.27054@groups.io>
5 siblings, 0 replies; 8+ messages in thread
From: Bob Feng @ 2020-02-05 13:47 UTC (permalink / raw)
To: Philippe Mathieu-Daude, devel@edk2.groups.io; +Cc: Gao, Liming
This patch set looks good to me.
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
-----Original Message-----
From: Philippe Mathieu-Daude [mailto:philmd@redhat.com]
Sent: Wednesday, February 5, 2020 6:49 AM
To: devel@edk2.groups.io
Cc: Philippe Mathieu-Daude <philmd@redhat.com>; Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>
Subject: [PATCH 0/3] BaseTools/Scripts: .mailmap improvements
Hi,
This series improves PatchCheck.py so Mergify can catch the emails rewritten by the mailing list.
Also it enable mailmap usage by default in the git config.
Regards,
Phil.
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Philippe Mathieu-Daudé (3):
BaseTools/Scripts/PatchCheck.py: Do not use mailmap
BaseTools/Scripts/PatchCheck.py: Detect emails rewritten by Groups.Io
BaseTools/Scripts: Add log.mailmap to SetupGit.py
BaseTools/Scripts/PatchCheck.py | 10 ++++++++--
BaseTools/Scripts/SetupGit.py | 1 +
2 files changed, 9 insertions(+), 2 deletions(-)
--
2.21.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [edk2-devel] [PATCH 0/3] BaseTools/Scripts: .mailmap improvements
[not found] ` <15F085AE91AD138D.27054@groups.io>
@ 2020-02-06 13:58 ` Bob Feng
2020-02-06 23:47 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 8+ messages in thread
From: Bob Feng @ 2020-02-06 13:58 UTC (permalink / raw)
To: devel@edk2.groups.io, Feng, Bob C, Philippe Mathieu-Daude; +Cc: Gao, Liming
Pushed.
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Bob Feng
Sent: Wednesday, February 5, 2020 9:47 PM
To: Philippe Mathieu-Daude <philmd@redhat.com>; devel@edk2.groups.io
Cc: Gao, Liming <liming.gao@intel.com>
Subject: Re: [edk2-devel] [PATCH 0/3] BaseTools/Scripts: .mailmap improvements
This patch set looks good to me.
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
-----Original Message-----
From: Philippe Mathieu-Daude [mailto:philmd@redhat.com]
Sent: Wednesday, February 5, 2020 6:49 AM
To: devel@edk2.groups.io
Cc: Philippe Mathieu-Daude <philmd@redhat.com>; Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>
Subject: [PATCH 0/3] BaseTools/Scripts: .mailmap improvements
Hi,
This series improves PatchCheck.py so Mergify can catch the emails rewritten by the mailing list.
Also it enable mailmap usage by default in the git config.
Regards,
Phil.
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Philippe Mathieu-Daudé (3):
BaseTools/Scripts/PatchCheck.py: Do not use mailmap
BaseTools/Scripts/PatchCheck.py: Detect emails rewritten by Groups.Io
BaseTools/Scripts: Add log.mailmap to SetupGit.py
BaseTools/Scripts/PatchCheck.py | 10 ++++++++--
BaseTools/Scripts/SetupGit.py | 1 +
2 files changed, 9 insertions(+), 2 deletions(-)
--
2.21.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [edk2-devel] [PATCH 0/3] BaseTools/Scripts: .mailmap improvements
2020-02-06 13:58 ` [edk2-devel] " Bob Feng
@ 2020-02-06 23:47 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-06 23:47 UTC (permalink / raw)
To: Feng, Bob C, devel@edk2.groups.io; +Cc: Gao, Liming
On 2/6/20 2:58 PM, Feng, Bob C wrote:
> Pushed.
Thanks Bob!
>
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Bob Feng
> Sent: Wednesday, February 5, 2020 9:47 PM
> To: Philippe Mathieu-Daude <philmd@redhat.com>; devel@edk2.groups.io
> Cc: Gao, Liming <liming.gao@intel.com>
> Subject: Re: [edk2-devel] [PATCH 0/3] BaseTools/Scripts: .mailmap improvements
>
> This patch set looks good to me.
>
> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
>
> -----Original Message-----
> From: Philippe Mathieu-Daude [mailto:philmd@redhat.com]
> Sent: Wednesday, February 5, 2020 6:49 AM
> To: devel@edk2.groups.io
> Cc: Philippe Mathieu-Daude <philmd@redhat.com>; Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>
> Subject: [PATCH 0/3] BaseTools/Scripts: .mailmap improvements
>
> Hi,
>
> This series improves PatchCheck.py so Mergify can catch the emails rewritten by the mailing list.
> Also it enable mailmap usage by default in the git config.
>
> Regards,
>
> Phil.
>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
>
> Philippe Mathieu-Daudé (3):
> BaseTools/Scripts/PatchCheck.py: Do not use mailmap
> BaseTools/Scripts/PatchCheck.py: Detect emails rewritten by Groups.Io
> BaseTools/Scripts: Add log.mailmap to SetupGit.py
>
> BaseTools/Scripts/PatchCheck.py | 10 ++++++++--
> BaseTools/Scripts/SetupGit.py | 1 +
> 2 files changed, 9 insertions(+), 2 deletions(-)
>
> --
> 2.21.1
>
>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-02-06 23:48 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-04 22:49 [PATCH 0/3] BaseTools/Scripts: .mailmap improvements Philippe Mathieu-Daudé
2020-02-04 22:49 ` [PATCH 1/3] BaseTools/Scripts/PatchCheck.py: Do not use mailmap Philippe Mathieu-Daudé
2020-02-04 22:49 ` [PATCH 2/3] BaseTools/Scripts/PatchCheck.py: Detect emails rewritten by Groups.Io Philippe Mathieu-Daudé
2020-02-04 22:49 ` [PATCH 3/3] BaseTools/Scripts: Add log.mailmap to SetupGit.py Philippe Mathieu-Daudé
2020-02-04 23:19 ` [edk2-devel] [PATCH 0/3] BaseTools/Scripts: .mailmap improvements Laszlo Ersek
2020-02-05 13:47 ` Bob Feng
[not found] ` <15F085AE91AD138D.27054@groups.io>
2020-02-06 13:58 ` [edk2-devel] " Bob Feng
2020-02-06 23:47 ` Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox