-
Hey all, How do I get a list of all file? using git I can run git ls-tree HEAD -r how can I do it with this library? the best I could find is: for file in repo.commit().tree.blobs:
print(file.abspath) but that only lists files in the top dictionary. Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
Byron
Jun 23, 2021
Replies: 2 comments 1 reply
-
You are probably looking for this: for entry in repo.commit().tree.traverse():
print(entry) There are fields or methods on the returned entries to obtain their name or path relative to the root tree. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Byron
-
To complete this, if you want a file listing, you want:
or
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You are probably looking for this:
There are fields or methods on the returned entries to obtain their name or path relative to the root tree.