mirror of
https://github.com/blender/blender
synced 2026-09-28 04:04:20 +03:00
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:
parent
1543338543
commit
5dddefc8d6
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue