[PatchCheck] Skip CRLF check in git .patch files
GIT allows only UNIX format in .patch file. Otherwise, git am or apply will report 'fatal: git apply: bad git-diff - expected /dev/null'. But, PatchCheck blocks non-CRLF changes in commit. It's mutual exclusive. Therefore, skip CRLF check in git .patch files. Signed-off-by: Aiden Park <aiden.park@intel.com>
This commit is contained in:
parent
7e731e1cfb
commit
2105a49e04
|
@ -369,7 +369,7 @@ class GitDiffCheck:
|
||||||
|
|
||||||
stripped = line.rstrip()
|
stripped = line.rstrip()
|
||||||
|
|
||||||
if self.force_crlf and eol != '\r\n':
|
if self.force_crlf and eol != '\r\n' and not self.filename.endswith('.patch'):
|
||||||
self.added_line_error('Line ending (%s) is not CRLF' % repr(eol),
|
self.added_line_error('Line ending (%s) is not CRLF' % repr(eol),
|
||||||
line)
|
line)
|
||||||
if '\t' in line:
|
if '\t' in line:
|
||||||
|
|
Loading…
Reference in New Issue