diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-08-18 11:52:39 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-08-18 11:52:39 -0400 |
commit | 5fc5cf0b5eb66f63d333fae63610a651b0368c59 (patch) | |
tree | da0c480081bc7099e185547ed9877d7eef6b25fd | |
parent | 8edd289273b33d353b7e858df1461d4cc2947232 (diff) | |
download | b4-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__.py | 2 |
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: |