回复: [edk2-discuss] Issues with PatchCheck script


gaoliming
 

I use git version 2.27. Do you verify the latest git version?

-----邮件原件-----
发件人: bounce+34241+423+4905953+8764802@groups.io
<bounce+34241+423+4905953+8764802@groups.io> 代表 Laszlo Ersek
发送时间: 2020年11月3日 4:49
收件人: discuss@edk2.groups.io; sandeep.dhanvada@...
主题: Re: [edk2-discuss] Issues with PatchCheck script

On 10/28/20 12:45, Sandeep Dhanvada wrote:
Hi,

I have 2 local commits in EDK-II repo. As per the steps mentioned in
https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Development-P
rocess,
I am executing PatchCheck.py, but, the execution of this script is giving
below error. I see that the command used is "git show --pretty=%cn <%ce>,
--no-patch, --no-use-mailmap, <CommitID>, but, as git complains that there is
no --no-patch option for git show and also format for --pretty should be in
quotes. I tried on git version 1.8.3.1 and 2.1.1. Is there any specific git version
needed to execute this script ?

==========
python BaseTools/Scripts/PatchCheck.py -1
Checking git commit: HEAD
Traceback (most recent call last):
File "BaseTools/Scripts/PatchCheck.py", line 770, in <module>
sys.exit(PatchCheckApp().retval)
File "BaseTools/Scripts/PatchCheck.py", line 733, in __init__
self.process_one_arg('HEAD')
File "BaseTools/Scripts/PatchCheck.py", line 747, in process_one_arg
self.ok &= CheckOneArg(arg, self.count).ok
File "BaseTools/Scripts/PatchCheck.py", line 714, in __init__
checker = CheckGitCommits(param, max_count)
File "BaseTools/Scripts/PatchCheck.py", line 650, in __init__
self.ok &= EmailAddressCheck(email, 'Committer').ok
File "BaseTools/Scripts/PatchCheck.py", line 36, in __init__
self.error('Email address is missing!')
File "BaseTools/Scripts/PatchCheck.py", line 47, in error
print('The ' + self.description + ' email address is not valid:')
AttributeError: EmailAddressCheck instance has no attribute 'description'

==========
"--no-patch" appeared in 1.8.4, as a synonym for "-s".

Not sure why it doesn't work with 2.1.1 -- perhaps your old git instance
appears first on $PATH?

Laszlo