From nobody Thu May 2 03:07:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+44818+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+44818+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1564704798; cv=none; d=zoho.com; s=zohoarc; b=TaXIwhLHDspXQQWIUz4a2MvlcI7pxVFn1VeojpOH152VJ/SBbmBXx74cyNkxjQ127Cd9UXUdm9XwNLZfDkqCgYi/L5p3iBTCFQVFKvEYHt/LHvKx7FN+0xSKy3737aO5karmh9zobyHc36tt1TkRUQ+q5zunQIMLnuLcTdcRPGc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564704798; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=vkeFblUw5B1n91AJhpd4KyJhwlSJ8Q0iBD88to1Q7+c=; b=LyPWe/i/UfDdbvIhwwY/Fekele5ttBR2CTw7g83SH+fv32MId3l7YNJy058rWbmzERTL95aMLnRrCmlZTQZIA3k2mC0oLCNs/I/rr0f0rlhLCS5zhklZiFsq8FI5jhTPjYeE7vvoWRj6UXbmcxnS/wanHLSC96yRIngCad5hdsE= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+44818+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1564704798633912.9122700966834; Thu, 1 Aug 2019 17:13:18 -0700 (PDT) Return-Path: X-Received: from mga01.intel.com (mga01.intel.com []) by groups.io with SMTP; Thu, 01 Aug 2019 17:13:17 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Aug 2019 17:13:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,336,1559545200"; d="scan'208";a="372796688" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.251.130.221]) by fmsmga006.fm.intel.com with ESMTP; 01 Aug 2019 17:13:17 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Jordan Justen Subject: [edk2-devel] [Patch 1/3] BaseTools/PatchCheck: Ignore blank lines in diff Date: Thu, 1 Aug 2019 17:13:12 -0700 Message-Id: <20190802001314.25980-2-michael.d.kinney@intel.com> In-Reply-To: <20190802001314.25980-1-michael.d.kinney@intel.com> References: <20190802001314.25980-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1564704798; bh=1fZheblcjM4MwaJBzARcp54br+/FkJIAtBFnqjBks2I=; h=Cc:Date:From:Reply-To:Subject:To; b=re5OKGw/vvx6rfsOzqBOg2d39Eamhio68C8qSjfBSNsmIK5UiggqrvRQVi6rCuQrNqc nzvtv+NzzJayxSP8Qf8UPU1okhusAvzkY4P5lgOGbLGy4eFX8Lt/65AGI36eTCL8dLlz+ PWok8U9Go0zFMVIFG/6i/HjG2IIwmQbc6A4= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" https://bugzilla.tianocore.org/show_bug.cgi?id=3D2044 When fixes are made for incorrect line endings, there are cases where the diff contains blank lines. Ignore these blank lines. Cc: Bob Feng Cc: Liming Gao Cc: Jordan Justen Signed-off-by: Michael D Kinney Reviewed-by: Bob Feng --- BaseTools/Scripts/PatchCheck.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck= .py index 6aec15d0f0..4f2ef81ae7 100755 --- a/BaseTools/Scripts/PatchCheck.py +++ b/BaseTools/Scripts/PatchCheck.py @@ -270,6 +270,7 @@ class GitDiffCheck: if line.startswith('@@ '): self.state =3D PRE_PATCH elif len(line) >=3D 1 and line[0] not in ' -+' and \ + not line.startswith('\r\n') and \ not line.startswith(r'\ No newline ') and not self.binary: for line in self.lines[self.line_num + 1:]: if line.startswith('diff --git'): @@ -313,6 +314,8 @@ class GitDiffCheck: pass elif line.startswith('+'): self.check_added_line(line[1:]) + elif line.startswith('\r\n'): + pass elif line.startswith(r'\ No newline '): pass elif not line.startswith(' '): --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#44818): https://edk2.groups.io/g/devel/message/44818 Mute This Topic: https://groups.io/mt/32685492/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 2 03:07:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+44819+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+44819+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1564704798; cv=none; d=zoho.com; s=zohoarc; b=FFX44OslQ8Tz2/Nf6nt6B/Zw0/3YI2MvJJQfZBmt4/0pEqRCa8I9eauSfjEPIVRpXj6/18YoZ4ABuMmLzeN/XX00DraSHfDJCzGWm9nA3plESEepkV9kn0g0k7Wa02pT8roPeWhmnMBNb+k4HQWWyFjtsR9x4peJV6o4EeqMPEs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564704798; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=CtrmbrTvL9szcT+KeW+1i0faf4Gozfg6aGPvyahJyhk=; b=BM5d7f/zTdCHVrcuTe+lPS5IjMPTeeuwWpibPwYJeqWXb9JR03gZ3543zQWp+jppbkUUC9BrKUMOAJipljq9hBoeC97y4F1LaRwOOurNyqQn1nGrGJC+hRGEiRNKw+SPOj1JMTUlvGzOWfmqumLtZ4nXVN+nGkNvu/4Ob5G79MU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+44819+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1564704798919318.6002250562111; Thu, 1 Aug 2019 17:13:18 -0700 (PDT) Return-Path: X-Received: from mga01.intel.com (mga01.intel.com []) by groups.io with SMTP; Thu, 01 Aug 2019 17:13:18 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Aug 2019 17:13:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,336,1559545200"; d="scan'208";a="372796692" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.251.130.221]) by fmsmga006.fm.intel.com with ESMTP; 01 Aug 2019 17:13:17 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Jordan Justen Subject: [edk2-devel] [Patch 2/3] BaseTools/PatchCheck: Add copy from/to keywords Date: Thu, 1 Aug 2019 17:13:13 -0700 Message-Id: <20190802001314.25980-3-michael.d.kinney@intel.com> In-Reply-To: <20190802001314.25980-1-michael.d.kinney@intel.com> References: <20190802001314.25980-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1564704798; bh=bLLw7ZW2Mge3AdQlcV9JH3AsojIZfOUg6sRReeg6MxY=; h=Cc:Date:From:Reply-To:Subject:To; b=ocm6AD5TsfxtWfonuHN3F/3xXddnBtYr99+eQudfM4Ez96KGWGvTk79pcGk/BzVRzWy ahV58T3v8aUIvo1IiNcEOP/rSCVP+FmtCb94L32jDWQBNSxJ812e4Wu2mAI9Y4zSdps3l heOo1szCcBl4dbTe2iCp3g/WgXoTr8qJTLE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" https://bugzilla.tianocore.org/show_bug.cgi?id=3D2044 When files are very similar, git will copy an existing file to a new location and then apply differences. This is operation identified in the diff with 'copy from' and 'copy to' lines that need to be ignored. Cc: Bob Feng Cc: Liming Gao Cc: Jordan Justen Signed-off-by: Michael D Kinney Reviewed-by: Bob Feng --- BaseTools/Scripts/PatchCheck.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck= .py index 4f2ef81ae7..6b07241bfe 100755 --- a/BaseTools/Scripts/PatchCheck.py +++ b/BaseTools/Scripts/PatchCheck.py @@ -331,6 +331,8 @@ class GitDiffCheck: 'old mode ', 'new mode ', 'similarity index ', + 'copy from ', + 'copy to ', 'rename ', ) =20 --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#44819): https://edk2.groups.io/g/devel/message/44819 Mute This Topic: https://groups.io/mt/32685493/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 2 03:07:53 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+44820+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+44820+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1564704799; cv=none; d=zoho.com; s=zohoarc; b=oELpOHI8hf0zZy6iMt3UwsOLrBjsvXW5604ekdyaZFupdgaJ5g3p9NK5fde7UwwSXsN//HRrN9d35vFna5Np4nvfegETgqZSsgusR6tUNEdl++dr06mqtoTChwIs4eepV/GPiD369Q1e6n++210etflGlHS/aAlrlSN5zTejz98= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564704799; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=V3B1SlCdxoLBq4Ll2G3qDgLo4Im+jIAxvi13KV5rHgc=; b=Lqr/Gst3yNDgzg5U0utpu2u3scic+VzhXj8qxaK+VsDGxGgBrV+KA0LtLM8bK7xPD1wxB///byok4gyiTsg9jiw5wlrS2rBXf6QeYVwrqWW640xF667Vg0lSGQQiHnErMyGiHo1mECQJQA0RhxOFsn8Q610bhRxvSMgYt1FjWXI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+44820+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1564704799365385.13003754702686; Thu, 1 Aug 2019 17:13:19 -0700 (PDT) Return-Path: X-Received: from mga01.intel.com (mga01.intel.com []) by groups.io with SMTP; Thu, 01 Aug 2019 17:13:18 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Aug 2019 17:13:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,336,1559545200"; d="scan'208";a="372796696" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.251.130.221]) by fmsmga006.fm.intel.com with ESMTP; 01 Aug 2019 17:13:18 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Jordan Justen Subject: [edk2-devel] [Patch 3/3] BaseTools/PatchCheck: Disable text conversion in 'git show' Date: Thu, 1 Aug 2019 17:13:14 -0700 Message-Id: <20190802001314.25980-4-michael.d.kinney@intel.com> In-Reply-To: <20190802001314.25980-1-michael.d.kinney@intel.com> References: <20190802001314.25980-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,michael.d.kinney@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1564704799; bh=VtKZdF7Yt75/X6fqy66zdwJ+uY5qCBn5gJtktkXJXUY=; h=Cc:Date:From:Reply-To:Subject:To; b=QdBouYHKDL8VZZ1DOH7LE9jwGT5tbN/C1ACaxm6/5Kn71dgu5AjRsGlFo7Z5YlwOtQR t7bS6Ap4mBGP9mvdc+mPlc9LfS0p9BDxhfhzZz64gThjZ1eaBcZZMJCUz23JI9L4hCBhO pB1MP46CdpeE3zwo0VaMaKCdEqv/G/GeY0Q= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" https://bugzilla.tianocore.org/show_bug.cgi?id=3D2044 'git show' is used to extrat the patch contents for analysis. Add the flag '--no-textconv' to the 'git show' command to disable the conversion from some binary file types to text content. Without this change, binary files such as .pdf files are converted to text in the show command and PatchCheck complains that the wrong line endings are used in the patch. Cc: Bob Feng Cc: Liming Gao Cc: Jordan Justen Signed-off-by: Michael D Kinney Acked-by: Laszlo Ersek Reviewed-by: Bob Feng Reviewed-by: Jordan Justen --- BaseTools/Scripts/PatchCheck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck= .py index 6b07241bfe..2a4e6f603e 100755 --- a/BaseTools/Scripts/PatchCheck.py +++ b/BaseTools/Scripts/PatchCheck.py @@ -543,7 +543,7 @@ class CheckGitCommits: =20 def read_patch_from_git(self, commit): # Run git to get the commit patch - return self.run_git('show', '--pretty=3Demail', commit) + return self.run_git('show', '--pretty=3Demail', '--no-textconv', c= ommit) =20 def run_git(self, *args): cmd =3D [ 'git' ] --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#44820): https://edk2.groups.io/g/devel/message/44820 Mute This Topic: https://groups.io/mt/32685494/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-