has anyone made a read-only FUSE filesystem for a git repository where every commit is a folder and the folder contains all the files in that commit?
the idea is that you could just run `cd COMMIT_ID` and poke around instead of checking out the commit
and maybe the branches could be symbolic links to the commit folders?
@b0rk the EdenFS portion of Sapling (https://github.com/facebook/sapling/) has the guts of this inside. Even though that project was built primarily for Sapling (an evolution of Mercurial), it can also mount Git repos. We talked about exposing literally the interface your described for some internal infrastructure in the early days. I'm no longer part of that team so I'm not sure if that ever got implemented, but it wouldn't be difficult if someone was motivated!
@b0rk while I'm remembering stuff, there was also a precursor internal project called `gvfs` (git view filesystem) that also had this interface. Reading the root directory showed no entries (because there were too many commits and `ls` needs to stat everything by default -> too costly), but you could cd/ls into a commit hash and see the tree at that commit. That was used to serve up commits for some internal build infrastructure.
@wez thanks! i guess that wasn't open sourced?
@b0rk no, but https://douchi.space/@fanzeyi/111463023032942836 is probably a million times easier to get running and hack on if you wanted to play around with it!
@wez ooh cool thank you!
(former member on the team built EdenFS).
I actually wrote the exact thing you described as a practice to familiarize myself with FUSE API: