public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Bob Feng" <bob.c.feng@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"leif@nuviainc.com" <leif@nuviainc.com>
Cc: "Gao, Liming" <liming.gao@intel.com>
Subject: Re: [edk2-devel] [PATCH 1/2] BaseTools/PatchCheck.py: add exception for diff orderfile
Date: Thu, 2 Jul 2020 23:47:51 +0000	[thread overview]
Message-ID: <BN6PR11MB006867DE9289E5E18157CA6DC96D0@BN6PR11MB0068.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200702153934.25262-2-leif@nuviainc.com>

Reviewed-by: Bob Feng <bob.c.feng@intel.com>

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Leif Lindholm
Sent: Thursday, July 2, 2020 11:40 PM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>
Subject: [edk2-devel] [PATCH 1/2] BaseTools/PatchCheck.py: add exception for diff orderfile

SetupGit.py adds BaseTools/Conf/diff.order as a diff orderfile, but that file currently has CRLF line endings, which causes all pattern matches to fail and the ordering remaining unaffected.

Add an exception to PatchCheck.py (to the existing .gitmodules clause), so that we can merge the fix to the config file.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Leif Lindholm <leif@nuviainc.com>
---
 BaseTools/Scripts/PatchCheck.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py index e38cf61f93da..527761986d4c 100755
--- a/BaseTools/Scripts/PatchCheck.py
+++ b/BaseTools/Scripts/PatchCheck.py
@@ -395,11 +395,12 @@ class GitDiffCheck:
                     # they are identified by their path.
                     #
                     self.force_crlf = False
-                if self.filename == '.gitmodules':
+                if self.filename == '.gitmodules' or \
+                   self.filename == 'BaseTools/Conf/diff.order':
                     #
-                    # .gitmodules is updated by git and uses tabs and LF line
-                    # endings.  Do not enforce no tabs and do not enforce
-                    # CR/LF line endings.
+                    # .gitmodules and diff orderfiles are used internally by git
+                    # use tabs and LF line endings.  Do not enforce no tabs and
+                    # do not enforce CR/LF line endings.
                     #
                     self.force_crlf = False
                     self.force_notabs = False
--
2.20.1





  reply	other threads:[~2020-07-02 23:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-02 15:39 [PATCH 0/2] BaseTools: minor PatchCheck.py fixes/changes Leif Lindholm
2020-07-02 15:39 ` [PATCH 1/2] BaseTools/PatchCheck.py: add exception for diff orderfile Leif Lindholm
2020-07-02 23:47   ` Bob Feng [this message]
2020-07-02 15:39 ` [PATCH 2/2] BaseTools: explicitly import email.header PatchCheck.py Leif Lindholm
2020-07-02 15:48   ` [edk2-devel] " Bob Feng
2020-07-03  7:20 ` [PATCH 0/2] BaseTools: minor PatchCheck.py fixes/changes Bob Feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BN6PR11MB006867DE9289E5E18157CA6DC96D0@BN6PR11MB0068.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox