-
-
Notifications
You must be signed in to change notification settings - Fork 954
Commit time of each file #1367
-
How can we get the commit time of each file in the tree by traversing it recursively?
when we traverse tree by pathlib , it does not show any time by git log -1 --pretty="format:%ci" <file_name>
Beta Was this translation helpful? Give feedback.
All reactions
The commit time is only available in commits themselves. Hence, in order to assign a timestamp to changes between commits, one has to diff them. There are probably plenty of algorithms that are feasible, implementing them fast isn't that easy though.
If performance becomes a problem, the python bindings to libgit2 might help.
Replies: 1 comment
-
The commit time is only available in commits themselves. Hence, in order to assign a timestamp to changes between commits, one has to diff them. There are probably plenty of algorithms that are feasible, implementing them fast isn't that easy though.
If performance becomes a problem, the python bindings to libgit2 might help.
Beta Was this translation helpful? Give feedback.