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>

Reviewed-by: Bob Feng <bob.c.feng@intel.com>
This commit is contained in:
Leif Lindholm
2020-07-02 23:39:33 +08:00
committed by mergify[bot]
parent 0622a7b1b2
commit c267eb889f

View File

@ -395,11 +395,12 @@ class GitDiffCheck:
# they are identified by their path. # they are identified by their path.
# #
self.force_crlf = False 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 # .gitmodules and diff orderfiles are used internally by git
# endings. Do not enforce no tabs and do not enforce # use tabs and LF line endings. Do not enforce no tabs and
# CR/LF line endings. # do not enforce CR/LF line endings.
# #
self.force_crlf = False self.force_crlf = False
self.force_notabs = False self.force_notabs = False