summaryrefslogtreecommitdiff
path: root/BaseTools/Scripts
diff options
context:
space:
mode:
authorMichael D Kinney <michael.d.kinney@intel.com>2019-08-01 16:03:46 -0700
committerMichael D Kinney <michael.d.kinney@intel.com>2019-08-07 22:12:02 -0700
commit96603b4f02b93d7725e5d6c1701b502d6b072ab3 (patch)
treec0091c5b921f3ad0f351df55cd49c0a7c02392a4 /BaseTools/Scripts
parent1eeb5ff160278e58ef9cbaef70c4d6800bebdc55 (diff)
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>
Diffstat (limited to 'BaseTools/Scripts')
-rwxr-xr-xBaseTools/Scripts/PatchCheck.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py
index 6b07241bfe..2a4e6f603e 100755
--- a/BaseTools/Scripts/PatchCheck.py
+++ b/BaseTools/Scripts/PatchCheck.py
@@ -543,7 +543,7 @@ class CheckGitCommits:
def read_patch_from_git(self, commit):
# 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):
cmd = [ 'git' ]