There is no way to get the commit time of a FILE in the tree , as something we can get via command
git log -1 --pretty="format:%cI" <file_path>
repo = git.Repo('some_repo')
tree = repo.tree().traverse()
for blob in tree:
print(blob.path)
if os.path.isfile(blob.abspath):
# get commit_time of blob something like 'git log -1 --pretty="format:%cI" blob.path'
pass
There is no way to get the commit time of a FILE in the tree , as something we can get via command
git log -1 --pretty="format:%cI" <file_path>