Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from git import Repo, Commit
repo = Repo.clone_from('git@github.com:smappi/smappi.git', '/tmp/xxx')
# repo = Repo('/tmp/xxx')
commits = list(repo.iter_commits('master', max_count=5))
[{'name': str(c.author), 'email': c.author.email, 'msg': c.message} for c in commits]
>>>
[{'name': 'Mikhail Andreev (adw0rd)',
'email': 'x11org@gmail.com',
'msg': '0.5.2\n'},
{'name': 'Mikhail Andreev (adw0rd)',
'email': 'x11org@gmail.com',
'msg': 'Support undefined in doctetst (cause undefined is object)\n'},
{'name': 'Mikhail Andreev (adw0rd)',
'email': 'x11org@gmail.com',
'msg': '0.5.1\n'},
{'name': 'Mikhail Andreev (adw0rd)',
'email': 'x11org@gmail.com',
'msg': 'Bugfixed adaptResultByMask when object is undefined\n'},
{'name': 'Mikhail Andreev (adw0rd)',
'email': 'x11org@gmail.com',
'msg': '0.5.0\n'}]
@azzamsa

This comment has been minimized.

Copy link

commented Oct 13, 2018

Thanks lot :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.