Skip to content

Commit 2b7f5cb

Browse files
committed
Commit._actor method made protected as it is only used by the Commit class and very specific so it's not suited to be part of the public API
1 parent b0e84a3 commit 2b7f5cb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/git/commit.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ def list_from_string(cls, repo, text):
182182
parents = []
183183
while lines and lines[0].startswith('parent'):
184184
parents.append(lines.pop(0).split()[-1])
185-
author, authored_date = cls.actor(lines.pop(0))
186-
committer, committed_date = cls.actor(lines.pop(0))
185+
author, authored_date = cls._actor(lines.pop(0))
186+
committer, committed_date = cls._actor(lines.pop(0))
187187

188188
messages = []
189189
while lines and lines[0].startswith(' '):
@@ -284,7 +284,7 @@ def __repr__(self):
284284
return '<git.Commit "%s">' % self.id
285285

286286
@classmethod
287-
def actor(cls, line):
287+
def _actor(cls, line):
288288
"""
289289
Parse out the actor (author or committer) info
290290
@@ -293,4 +293,4 @@ def actor(cls, line):
293293
"""
294294
m = re.search(r'^.+? (.*) (\d+) .*$', line)
295295
actor, epoch = m.groups()
296-
return [Actor.from_string(actor), time.gmtime(int(epoch))]
296+
return (Actor.from_string(actor), time.gmtime(int(epoch)))

0 commit comments

Comments
 (0)