summaryrefslogtreecommitdiffstats
path: root/BaseTools/Scripts
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Scripts')
-rwxr-xr-xBaseTools/Scripts/PatchCheck.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py
index 3b6d77081e..174d442aa7 100755
--- a/BaseTools/Scripts/PatchCheck.py
+++ b/BaseTools/Scripts/PatchCheck.py
@@ -552,6 +552,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:
@@ -570,6 +572,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