summaryrefslogtreecommitdiff
path: root/git/objects/commit.py
diff options
context:
space:
mode:
authorTwist <itsluketwist@gmail.com>2022-08-24 19:05:45 +0100
committerTwist <itsluketwist@gmail.com>2022-08-24 19:05:45 +0100
commit09f8a1b7b674d6138b872643b13ffc5444fab24f (patch)
tree09f226e4bd4e304d6a0be8677bb6ed9cf022462b /git/objects/commit.py
parentc2fd97e374f9c1187f165b18651928c011e6f041 (diff)
downloadgitpython-09f8a1b7b674d6138b872643b13ffc5444fab24f.tar.gz
Use the same regex as the Actor class when determining co-authors.
Diffstat (limited to 'git/objects/commit.py')
-rw-r--r--git/objects/commit.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/git/objects/commit.py b/git/objects/commit.py
index 58f0bde7..cf7d9aaa 100644
--- a/git/objects/commit.py
+++ b/git/objects/commit.py
@@ -752,11 +752,11 @@ class Commit(base.Object, TraversableIterableObj, Diffable, Serializable):
if self.message:
results = re.findall(
- r"^Co-authored-by: ((?:\w|\-| ){0,38} <\S*>)$",
+ r"^Co-authored-by: (.*) <(.*?)>$",
self.message,
re.MULTILINE,
)
- for author_string in results:
- co_authors.append(Actor._from_string(author_string))
+ for author in results:
+ co_authors.append(Actor(*author))
return co_authors