-
-
Notifications
You must be signed in to change notification settings - Fork 954
Get commit time of each File in tree #1369
Unanswered
dsharma522
asked this question in
Q&A
-
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
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
See answer in #1367 .
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment