I am trying to make the equivalent of git log filename in a git repository using pygit2. The documentation explains how to make git log as follows:
from pygit2 import GIT_SORT_TIME for commit in repo.walk(oid, GIT_SORT_TIME): print(commit.hex)
Do you have any ideas?
thanks
EDIT:
I now have something similar, more or less accurate:
from pygit2 import GIT_SORT_TIME, Repository repo = Repository('/path/to/repo') def iter_commits(name): last_commit = None last_oid = None
user1415785
source share