From 09f8a1b7b674d6138b872643b13ffc5444fab24f Mon Sep 17 00:00:00 2001 From: Twist Date: Wed, 24 Aug 2022 19:05:45 +0100 Subject: Use the same regex as the Actor class when determining co-authors. --- git/objects/commit.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'git/objects/commit.py') 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 -- cgit v1.2.1