Credits Script: Ignore rubbish at the end of co-author lines

Co-author lines are parsed in commit messages to add to the credits.
When the line does not end with the author's email, it will create a
duplicated entry. This is easy to fix if the email is enclosed in <>,
just discard what follows the address.

Example of this in commit e10a50f890

Ref !160527
This commit is contained in:
Damien Picard 2026-06-22 17:12:48 +02:00 • committed by Campbell Barton
parent 1543338543
commit 5dddefc8d6

View file

@ -118,6 +118,9 @@ class GitCommit:
if not ("<" in author and ">" in author):
# Always follow `Name <>` spec, even when no email is given.
author = author + " <>"
elif not author.endswith(">"):
# In case the co-author line has rubbish after the author email.
author = author.rsplit(">", 1)[0] + ">"
authors.append(author)
return authors