Open jmurty opened 10 years ago
Hey @jmurty, I did something similar to this in our fork with git fat list
.
Your solution of storing hash->filename strings in a dict is the one I tried first too, but you quickly run out of memory for medium to large sized repositories. The way we implemented it is running through rev-list twice which isn't ideal, but better than nothing at all.
Thanks for the feedback @abraithwaite.
I have just added a small improvement to the proposed feature to clear out uninteresting filenames during processing, which should massively reduce the memory consumption. Or at least use no more memory than is really necessary to store all the filenames of interest.
Are you able to test this improvement against a medium- or large-size repository to see if it survives?
The '--filenames' option makes it easy to view the filename represented by a git-fat object reference, at the cost of a slight performance and memory hit compared to the plain
git-fat status
command.This option is most helpful when you are thinking about running
git-fat gc
to clean up some garbage/unreferenced objects, so you can check what you are about to delete.status
command, print filename(s) next to git-fat object hash values.