public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Liming Gao <liming.gao@intel.com>,
	Bob Feng <bob.c.feng@intel.com>,
	devel@edk2.groups.io
Cc: Jordan Justen <jordan.l.justen@intel.com>
Subject: Re: [PATCH v3 4/4] BaseTools/PatchCheck.py: Check the committer email address
Date: Thu, 9 Jan 2020 11:54:44 +0100	[thread overview]
Message-ID: <85f1c2ae-3592-96f3-0e7b-2220ad205a89@redhat.com> (raw)
In-Reply-To: <20200109104918.29750-5-philmd@redhat.com>

On 1/9/20 11:49 AM, Philippe Mathieu-Daude wrote:
> To avoid patches committed with incorrect email address,
> use the EmailAddressCheck class on the committer email too.
> 
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>

Sorry wrong Cc list, I'll respin.

> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
> Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com>
> ---
>   BaseTools/Scripts/PatchCheck.py | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py
> index e7b3c3bae47a..fe8e6a64f2bb 100755
> --- a/BaseTools/Scripts/PatchCheck.py
> +++ b/BaseTools/Scripts/PatchCheck.py
> @@ -561,6 +561,8 @@ class CheckGitCommits:
>                   else:
>                       blank_line = True
>                   print('Checking git commit:', commit)
> +            email = self.read_committer_email_address_from_git(commit)
> +            self.ok &= EmailAddressCheck(email, 'Committer').ok
>               patch = self.read_patch_from_git(commit)
>               self.ok &= CheckOnePatch(commit, patch).ok
>           if not commits:
> @@ -579,6 +581,10 @@ class CheckGitCommits:
>           # Run git to get the commit patch
>           return self.run_git('show', '--pretty=email', '--no-textconv', 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)
> +
>       def run_git(self, *args):
>           cmd = [ 'git' ]
>           cmd += args
> 


      reply	other threads:[~2020-01-09 10:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-09 10:49 [PATCH v3 0/4] BaseTools/PatchCheck: Check committer/author email addresses Philippe Mathieu-Daudé
2020-01-09 10:49 ` [PATCH v3 1/4] BaseTools/PatchCheck.py: Extract email check code to EmailAddressCheck Philippe Mathieu-Daudé
2020-01-09 10:49 ` [PATCH v3 2/4] BaseTools/PatchCheck.py: Let EmailAddressCheck describe email checked Philippe Mathieu-Daudé
2020-01-09 10:49 ` [PATCH v3 3/4] BaseTools/PatchCheck.py: Check the patch author email address Philippe Mathieu-Daudé
2020-01-09 10:49 ` [PATCH v3 4/4] BaseTools/PatchCheck.py: Check the committer " Philippe Mathieu-Daudé
2020-01-09 10:54   ` Philippe Mathieu-Daudé [this message]

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-list 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=85f1c2ae-3592-96f3-0e7b-2220ad205a89@redhat.com \
    --to=devel@edk2.groups.io \
    /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