REF: https://bugzilla.tianocore.org/show_bug.cgi?id=113

Strip the trailing characters before checking the subject line is
less than 72 characters.

Fixes: e61406708c83f
Cc: Liming Gao <liming....@intel.com>
Cc: Jordan Justen <jordan.l.jus...@intel.com>
Signed-off-by: Philippe Mathieu-Daude <phi...@redhat.com>
---
Cc: Yonghong Zhu <yonghong....@intel.com>
Cc: Zhichao Gao <zhichao....@intel.com>
---
 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 2a4e6f603e79..b72e71963ea8 100755
--- a/BaseTools/Scripts/PatchCheck.py
+++ b/BaseTools/Scripts/PatchCheck.py
@@ -196,7 +196,7 @@ class CommitMessageCheck:
             self.error('Empty commit message!')
             return
 
-        if count >= 1 and len(lines[0]) >= 72:
+        if count >= 1 and len(lines[0].strip()) >= 72:
             self.error('First line of commit message (subject line) ' +
                        'is too long.')
 
-- 
2.21.0


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#52425): https://edk2.groups.io/g/devel/message/52425
Mute This Topic: https://groups.io/mt/68831576/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to