public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Liming Gao" <liming.gao@intel.com>
To: "Jiang, Guomin" <guomin.jiang@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Feng, Bob C" <bob.c.feng@intel.com>
Subject: Re: [PATCH 1/1] BaseTools/Scripts: Ignore the CRLF check when upgrade submodule.
Date: Tue, 21 Jul 2020 05:56:39 +0000	[thread overview]
Message-ID: <MWHPR11MB16306AC105B06625327930FA80780@MWHPR11MB1630.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200721025846.2249-1-guomin.jiang@intel.com>

Guomin:
  +                   self.lines[self.line_num+1].endswith('160000\n') or
  
  What means for this line? 


Thanks
Liming
-----Original Message-----
From: Jiang, Guomin <guomin.jiang@intel.com> 
Sent: 2020年7月21日 10:59
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>
Subject: [PATCH 1/1] BaseTools/Scripts: Ignore the CRLF check when upgrade submodule.

When i upgrade openssl to 1.1.1g, error occurred when run PatchCheck.py.
The reason is that the submodule will end with LF, but it will check based on file rule, it make no sense and need ignore the check.

Signed-off-by: Guomin Jiang <guomin.jiang@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
---
 BaseTools/Scripts/PatchCheck.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py index 7db0775d14d1..46b9936c6576 100755
--- a/BaseTools/Scripts/PatchCheck.py
+++ b/BaseTools/Scripts/PatchCheck.py
@@ -405,12 +405,16 @@ class GitDiffCheck:
                     #
                     self.force_crlf = False
                 if self.filename == '.gitmodules' or \
+                   self.lines[self.line_num+1].endswith('160000\n') or 
+ \
                    self.filename == 'BaseTools/Conf/diff.order':
                     #
                     # .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.
                     #
+                    # When update submodule, it will encode with LF line and do
+                    # not enforce CR/LF line endings.
+                    #
                     self.force_crlf = False
                     self.force_notabs = False
             elif len(line.rstrip()) != 0:
--
2.25.1.windows.1


  reply	other threads:[~2020-07-21  5:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21  2:58 [PATCH 1/1] BaseTools/Scripts: Ignore the CRLF check when upgrade submodule Guomin Jiang
2020-07-21  5:56 ` Liming Gao [this message]
2020-07-21 10:38   ` Guomin Jiang
2020-07-22  2:00     ` Liming Gao
2020-07-22  2:08     ` Bob Feng
2020-07-22  2:21       ` Guomin Jiang
2020-07-22  2:28         ` Bob Feng
2020-07-22  7:29           ` Liming Gao

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=MWHPR11MB16306AC105B06625327930FA80780@MWHPR11MB1630.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