aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-08-18 11:52:39 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-08-18 11:52:39 -0400
commit5fc5cf0b5eb66f63d333fae63610a651b0368c59 (patch)
treeda0c480081bc7099e185547ed9877d7eef6b25fd
parent8edd289273b33d353b7e858df1461d4cc2947232 (diff)
downloadb4-5fc5cf0b5eb66f63d333fae63610a651b0368c59.tar.gz
Require that a trailer is at least 2 chars long
I can't think of any trailers that are shorter than 2 characters, so tweak the regex to avoid one of the possible false positives. Reported-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r--b4/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index cd07be0..e19ec90 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -887,7 +887,7 @@ class LoreMessage:
self.trailers.add(('Fixes', tvalue))
# Do we have something that looks like a person-trailer?
- matches = re.findall(r'^\s*([\w-]+):[ \t]+(.*<\S+>)\s*$', self.body, re.MULTILINE)
+ matches = re.findall(r'^\s*([\w-]{2,}):[ \t]+(.*<\S+>)\s*$', self.body, re.MULTILINE)
# These are commonly part of patch/commit metadata
badtrailers = ('from', 'author', 'cc')
if matches: