]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/PatchCheck.py: add exception for diff orderfile
authorLeif Lindholm <leif@nuviainc.com>
Thu, 2 Jul 2020 15:39:33 +0000 (23:39 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 3 Jul 2020 00:18:50 +0000 (00:18 +0000)
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>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
BaseTools/Scripts/PatchCheck.py

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