I need author name and last commit time for a specified file with python. Currentrly, I'm trying to use dulwich.
There're plenty of apis to retrieve objects for a specific SHA like:
repo = Repo("myrepo")
head = repo.head()
object = repo.get_object(head)
author = object.author
time = object.commit_time
But, how do i know the recent commit for the specific file? Is there a way to retrieve it like:
repo = Repo("myrepo")
commit = repo.get_commit('a.txt')
author = commit.author
time = commit.commit_time
or
repo = Repo("myrepo")
sha = repo.get_sha_for('a.txt')
object = repo.get_object(sha)
author = object.author
time = object.commit_time
Thank you.