From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web12.11434.1595300328890870648 for ; Mon, 20 Jul 2020 19:58:49 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: guomin.jiang@intel.com) IronPort-SDR: Lo8CtdyX1IcD9GuJbvMh3ek/UHdwNk+C7Bw3GCqGeJNmJmuqsuso9h4YTY6jv9obF6W/Cli374 83TnmFfuxk1g== X-IronPort-AV: E=McAfee;i="6000,8403,9688"; a="151396804" X-IronPort-AV: E=Sophos;i="5.75,377,1589266800"; d="scan'208";a="151396804" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2020 19:58:48 -0700 IronPort-SDR: gPmuH2iPO2uIdfHT40r7qaJYHpskwCHPzmD2YqhcnBXT52m1Q9RajiI/GwFIrTHTrBkVbAwfcY cr+NCQ7ASYSA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,377,1589266800"; d="scan'208";a="362223409" Received: from guominji-mobl.ccr.corp.intel.com ([10.238.13.140]) by orsmga001.jf.intel.com with ESMTP; 20 Jul 2020 19:58:46 -0700 From: "Guomin Jiang" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao Subject: [PATCH 1/1] BaseTools/Scripts: Ignore the CRLF check when upgrade submodule. Date: Tue, 21 Jul 2020 10:58:46 +0800 Message-Id: <20200721025846.2249-1-guomin.jiang@intel.com> X-Mailer: git-send-email 2.25.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Cc: Bob Feng Cc: Liming Gao --- 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