aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-10-19 08:35:00 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-10-19 08:35:00 -0400
commit0862b9b9f2dfcc600b1b2c0a6f5d5e7cc35164e4 (patch)
treea70417a7f82763eff1f965c13f0df6810686bc0b
parentc0910ee77a2ab92cc39c32b11994a5518e70fa9b (diff)
downloadb4-0862b9b9f2dfcc600b1b2c0a6f5d5e7cc35164e4.tar.gz
Fix Link: and Cc: trailer recognition
Link is a non-person trailer, so should be recognized as such. Cc is a person-trailer but we always expected that to include <> surrounding the address, which is not correct in all cases. Reported-by: Greg Kroah-Hartman <greg@kroah.com> Reported-by: Johan Hovold <johan@kernel.org> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r--b4/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index 9cd1f87..364e3f0 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -1177,7 +1177,7 @@ class LoreMessage:
@staticmethod
def find_trailers(body):
headers = ('subject', 'date', 'from')
- nonperson = ('fixes', 'subject', 'date')
+ nonperson = ('fixes', 'subject', 'date', 'link')
# Fix some more common copypasta trailer wrapping
# Fixes: abcd0123 (foo bar
# baz quux)
@@ -1203,7 +1203,7 @@ class LoreMessage:
if len(others) and tname in headers:
logger.debug('Ignoring %s (header after other content)', line)
continue
- mperson = re.search(r'<\S+@\S+\.\S+>', groups[1])
+ mperson = re.search(r'\S+@\S+\.\S+', groups[1])
if not mperson and tname not in nonperson:
logger.debug('Ignoring %s (not a recognized non-person trailer)', line)
continue