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
I couldn't find a more elegant way than actually calling
This is the end result:
configFiles = repo.git.execute( ['git', 'ls-tree', '--name-only', commit.hexsha, path]).split()
commit is a
git.Commit object and
path is the path I'm interested in.