summaryrefslogtreecommitdiffstats
path: root/BaseTools
diff options
context:
space:
mode:
authorLeif Lindholm <leif@nuviainc.com>2020-07-02 23:39:33 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-07-03 00:18:50 +0000
commitc267eb889fe1244840eb4fd067fe0d85e3cc271f (patch)
tree04ad864212f72a1e171e1816d117eda562206354 /BaseTools
parent0622a7b1b203ad4ab1675533e958792fc1afc12b (diff)
downloadedk2-c267eb889fe1244840eb4fd067fe0d85e3cc271f.tar.gz
edk2-c267eb889fe1244840eb4fd067fe0d85e3cc271f.tar.bz2
edk2-c267eb889fe1244840eb4fd067fe0d85e3cc271f.zip
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>
Diffstat (limited to 'BaseTools')
-rwxr-xr-xBaseTools/Scripts/PatchCheck.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py
index e38cf61f93..527761986d 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