From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: jordan.l.justen@intel.com) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by groups.io with SMTP; Fri, 02 Aug 2019 11:29:02 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Aug 2019 11:29:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,339,1559545200"; d="scan'208";a="181085865" Received: from blwixom-mobl1.amr.corp.intel.com (HELO localhost) ([10.252.138.75]) by FMSMGA003.fm.intel.com with ESMTP; 02 Aug 2019 11:29:01 -0700 MIME-Version: 1.0 In-Reply-To: <20190802001314.25980-4-michael.d.kinney@intel.com> References: <20190802001314.25980-1-michael.d.kinney@intel.com> <20190802001314.25980-4-michael.d.kinney@intel.com> From: "Jordan Justen" Cc: Bob Feng , Liming Gao , Laszlo Ersek To: Michael D Kinney , devel@edk2.groups.io Subject: Re: [Patch 3/3] BaseTools/PatchCheck: Disable text conversion in 'git show' Message-ID: <156477054101.20290.17514635538979393303@jljusten-skl> User-Agent: alot/0.8 Date: Fri, 02 Aug 2019 11:29:01 -0700 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable First, I hope we don't add lots of large .pdf files into the source tree. I see two duplicated > 200k .pdf files in edk2, which seems like a waste of space in the edk2 tree. BaseTools/Source/C/BrotliCompress/docs/brotli-comparison-study-2015-09-22.p= df MdeModulePkg/Library/BrotliCustomDecompressLib/docs/brotli-comparison-study= -2015-09-22.pdf Second, I'm not too sure about this change. It seems like it might have unintended consequences. One thought I had is that it might break UTF-16 unicode files diffs, but luckily I think we've pretty much gotten rid of UTF-16 files at this point. I also wonder if adding a .pdf attribute like Laszlo recommends for .efi might be an alternative solution. https://github.com/tianocore/tianocore.github.io/wiki/Laszlo's-unkempt-git-= guide-for-edk2-contributors-and-maintainers#contrib-09 We could actually add these setting in the git tree in a .gitattributes file, right? Has this been suggested? I think Laszlo documented this before we had converted edk2 to git. -Jordan On 2019-08-01 17:13:14, Michael D Kinney wrote: > https://bugzilla.tianocore.org/show_bug.cgi?id=3D2044 >=20 > '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. >=20 > 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. >=20 > 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(-) >=20 > diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchChe= ck.py > index 6b07241bfe..2a4e6f603e 100755 > --- a/BaseTools/Scripts/PatchCheck.py > +++ b/BaseTools/Scripts/PatchCheck.py > @@ -543,7 +543,7 @@ class CheckGitCommits: > =20 > def read_patch_from_git(self, commit): > # Run git to get the commit patch > - return self.run_git('show', '--pretty=3Demail', commit) > + return self.run_git('show', '--pretty=3Demail', '--no-textconv',= commit) > =20 > def run_git(self, *args): > cmd =3D [ 'git' ] > --=20 > 2.21.0.windows.1 >=20