From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.81]) by mx.groups.io with SMTP id smtpd.web12.7144.1578567289784544134 for ; Thu, 09 Jan 2020 02:54:49 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=W7vNDJI3; spf=pass (domain: redhat.com, ip: 207.211.31.81, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578567288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r6msAbMvFTty9+fYw6mONMU1ixDRbUn3/DHp68NBC2Y=; b=W7vNDJI3KHXu1derSwdYIuD77Pc9rqwF9naWi/dYadQpEN52E9+DS30evej4UvoeH40hKr f2S40vwCGL4nIdi+lNxSnh5cD//uURJumG+WxW/SeS99lLTeaqutETgpHHfC5f7aXYbOCS 0e/URgHCDq4aaWZoTNcynKzCLr0JzeM= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-149-6HgbTW-sMC-vAjGhc6jNyA-1; Thu, 09 Jan 2020 05:54:47 -0500 Received: by mail-wr1-f70.google.com with SMTP id f17so2739491wrt.19 for ; Thu, 09 Jan 2020 02:54:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=r6msAbMvFTty9+fYw6mONMU1ixDRbUn3/DHp68NBC2Y=; b=D6lqCbzZyepGB9IH6hO0k4v9H0XPdPWjRZ+dIOjmdeoyNa7stAlkx0AmCpCEiBT+RP KQViBwP/i4AORNaFgv2gZB+0B6EAqUnQt2usvzwvwk6cubT42HP/hA+tNs3N0nonGP68 dJDlhcBLhtx44PaZDF9idWYQQzB0MWK5AI27kRKjDuS1dwSNQBtsUVhErpUmy+t8HHcC TtTiDxQoeoKqsU6bRbUJNH21cNkrNbxU41h4vCkq/BeYYoSZhssJmRxCxWvnjBmiJRbO Qgg+BkwOIGOU3SSHILxcVnecTN07aCoWk8d2foUpGLc8HKSSwGQ/ZtaDpkAkZ8wBM7hz Ju7w== X-Gm-Message-State: APjAAAVb1kP/PiYmUMUOFMPJshfLeOP290x/Ii57rdJpyeWneiyvEGDL jQz8wCVrbB6613+qb1w2OzhFZI4ZMO9Z8nzIHnJWo8tWYhTkHn+rgeDebuOeWG0HdakQIElc9RL 8u9aPDZ3avSXlqg== X-Received: by 2002:a1c:28d4:: with SMTP id o203mr4065594wmo.123.1578567286541; Thu, 09 Jan 2020 02:54:46 -0800 (PST) X-Google-Smtp-Source: APXvYqyd2tb0XtP8RD0TF/TNNnrq+Bn9YW0FdlbBz5dc2+WJ4n+tm/2qEjcvB1w3cA7B0IEmqTRRPA== X-Received: by 2002:a1c:28d4:: with SMTP id o203mr4065576wmo.123.1578567286346; Thu, 09 Jan 2020 02:54:46 -0800 (PST) Return-Path: Received: from [192.168.1.35] (113.red-83-57-172.dynamicip.rima-tde.net. [83.57.172.113]) by smtp.gmail.com with ESMTPSA id b10sm7904841wrt.90.2020.01.09.02.54.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Jan 2020 02:54:45 -0800 (PST) Subject: Re: [PATCH v3 4/4] BaseTools/PatchCheck.py: Check the committer email address To: Liming Gao , Bob Feng , devel@edk2.groups.io Cc: Jordan Justen References: <20200109104918.29750-1-philmd@redhat.com> <20200109104918.29750-5-philmd@redhat.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Message-ID: <85f1c2ae-3592-96f3-0e7b-2220ad205a89@redhat.com> Date: Thu, 9 Jan 2020 11:54:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20200109104918.29750-5-philmd@redhat.com> X-MC-Unique: 6HgbTW-sMC-vAjGhc6jNyA-1 X-Mimecast-Spam-Score: 0 Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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 > Cc: Jordan Justen Sorry wrong Cc list, I'll respin. > Reviewed-by: Bob Feng > Signed-off-by: Philippe Mathieu-Daude > --- > 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 >