Using GitPython, I'm trying to list the content of a directory at a given commit (i.e. a "snapshot" of the directory at the time).
In the terminal, what I'd do is:
git ls-tree --name-only 4b645551aa82ec55d1794d0bae039dd28e6c5704
How can I do the same in GitPyhon?
Based on the answers I've found to a similar question (GitPython get tree and blob object by sha) I've tried recursively traversing base_commit.tree
and its .trees
, but I don't seem to get anywhere.
Any ideas?