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?

guys this is such a fun idea I cannot believe people are in the replies trying to explain to me why they think it is impractical

the whole point of computers is to do impractical things and see what happens

seems like the answer is yes!

- https://github.com/fanzeyi/giblefs (fuse implementation in rust where every commit is a folder)
- https://orib.dev/git9.html (for plan 9)

would love to hear about any others

GitHub - fanzeyi/giblefs: Mapping a Git repository as a virtual filesystem

Mapping a Git repository as a virtual filesystem. Contribute to fanzeyi/giblefs development by creating an account on GitHub.

GitHub

ok I got extremely nerd sniped and made my own version of this “filesystem where every git commit is a folder" thing https://github.com/jvns/git-commit-folders

I wrote a FUSE version and an NFS version that I think will be easier for mac users to use. it definitely does not work on windows.

it probably has about 5 million bugs but it seems to kind of work

GitHub - jvns/git-commit-folders

Contribute to jvns/git-commit-folders development by creating an account on GitHub.

GitHub
@b0rk I asked a friend at MS who helpfully pointed me to the fact that Windows since Win 10 build 1903 ships with a 9P client (because WSL2 uses it) so in theory if someone did want to make this idea work on Windows too then it might be possible.
@0x2ba22e11 ooh cool
@b0rk @0x2ba22e11 There is a FUSE equivalent for Windows, btw: WinFSP (https://winfsp.dev). The excellent SSHFS for Windows (https://github.com/winfsp/sshfs-win) is implemented on top of it.
WinFsp

@jrjsmrtn thanks!