I want to list a directory from a Git repository together with the latest commit information of each directory entry. Similiar to how GitHub displays directories or how viewvc displays a directory in an SVN/CVS repository.
Currently I do it like this:
Get the directory entries with
git ls-tree master
and parse the directory structure from the output.Then for each directory entry I do this:
git log -n 1 master -- filename
and parse the commit information from it (I specify a special format string to make this easier, but this isn't relevant to my problem).
It's pretty obvious that this is very slow, because I have to call Git for each file. Is there a faster way to do this? Maybe a single command I can execute to get all the data I need at once?