BaseTools/PatchCheck: Disable text conversion in 'git show'
https://bugzilla.tianocore.org/show_bug.cgi?id=2044 'git show' is used to extract the patch contents for analysis. Add the flag '--no-textconv' to the 'git show' command to disable the conversion from some binary file types to text content. Without this change, binary files such as .pdf files are converted to text in the show command and PatchCheck complains that the wrong line endings are used in the patch. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
@ -543,7 +543,7 @@ class CheckGitCommits:
|
|||||||
|
|
||||||
def read_patch_from_git(self, commit):
|
def read_patch_from_git(self, commit):
|
||||||
# Run git to get the commit patch
|
# Run git to get the commit patch
|
||||||
return self.run_git('show', '--pretty=email', commit)
|
return self.run_git('show', '--pretty=email', '--no-textconv', commit)
|
||||||
|
|
||||||
def run_git(self, *args):
|
def run_git(self, *args):
|
||||||
cmd = [ 'git' ]
|
cmd = [ 'git' ]
|
||||||
|
Reference in New Issue
Block a user