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
@b0rk Not FUSE, but I made one for Python Paths: https://github.com/encukou/gitpathlib
GitHub - encukou/gitpathlib: Object-oriented paths in Git repositories

Object-oriented paths in Git repositories. Contribute to encukou/gitpathlib development by creating an account on GitHub.

GitHub

@encukou @b0rk There is also `fsspec`: Filesystem interfaces for Python, which among others provide filesystem-like interface to Git repositories, in Python

https://filesystem-spec.readthedocs.io/

fsspec: Filesystem interfaces for Python — fsspec 2024.6.0.post1+g8be9763.d20240613 documentation