jedbrown / git-fat

Simple way to handle fat files without committing them to git, supports synchronization using rsync
BSD 2-Clause "Simplified" License
621 stars 137 forks source link

Print filenames for objects in `status` output with '--filenames' option #44

Open jmurty opened 10 years ago

jmurty commented 10 years ago

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.

abraithwaite commented 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.

jmurty commented 10 years ago

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?