git-show¶
Showing a commit¶
$> git show d370f56
>>> repo = pygit2.Repository('/path/to/repository')
>>> commit = repo.revparse_single('d370f56')
Show log message¶
>>> message = commit.message
Show SHA hash¶
>>> hash = commit.hex
Show diff¶
>>> diff = commit.tree.diff()
Show all files in commit¶
>>> for e in commit.tree:
>>> print(e.name)