From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: michael.d.kinney@intel.com) Received: from mga01.intel.com (mga01.intel.com []) by groups.io with SMTP; Thu, 01 Aug 2019 17:13:18 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Aug 2019 17:13:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,336,1559545200"; d="scan'208";a="372796696" Received: from mdkinney-mobl2.amr.corp.intel.com ([10.251.130.221]) by fmsmga006.fm.intel.com with ESMTP; 01 Aug 2019 17:13:18 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Jordan Justen Subject: [Patch 3/3] BaseTools/PatchCheck: Disable text conversion in 'git show' Date: Thu, 1 Aug 2019 17:13:14 -0700 Message-Id: <20190802001314.25980-4-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190802001314.25980-1-michael.d.kinney@intel.com> References: <20190802001314.25980-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit https://bugzilla.tianocore.org/show_bug.cgi?id=2044 'git show' is used to extrat 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 Cc: Liming Gao Cc: Jordan Justen Signed-off-by: Michael D Kinney --- BaseTools/Scripts/PatchCheck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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' ] -- 2.21.0.windows.1