diff options
author | Twist <itsluketwist@gmail.com> | 2022-08-23 19:52:11 +0100 |
---|---|---|
committer | Twist <itsluketwist@gmail.com> | 2022-08-23 19:52:11 +0100 |
commit | c2fd97e374f9c1187f165b18651928c011e6f041 (patch) | |
tree | c95eb993925d8d0c2d5e114ec690e2420b345558 /git/objects/commit.py | |
parent | 3cb7ecf4e03c599d9e6f0b2416082025d3fa849a (diff) | |
download | gitpython-c2fd97e374f9c1187f165b18651928c011e6f041.tar.gz |
Update regex to extract the author string, and create the Actor using the _from_string classmethod.
Diffstat (limited to 'git/objects/commit.py')
-rw-r--r-- | git/objects/commit.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/git/objects/commit.py b/git/objects/commit.py index 65c94f23..58f0bde7 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: ((?:\w|\-| ){0,38} <\S*>)$", self.message, re.MULTILINE, ) - for author in results: - co_authors.append(Actor(*author)) + for author_string in results: + co_authors.append(Actor._from_string(author_string)) return co_authors |