FUSE filesystem that provides a read-only view into a git repository's branches and their contents.
It was written for fun and should be considered experimental.
First install Go, then gitviewfs:
$ go get -u github.com/josh-newman/gitviewfs/cmd/gitviewfs/
You'll also need to install FUSE (macOS, Linux).
gitviewfs has two required arguments:
$ gitviewfs [-debug] /mount/point /path/to/repository
For example:
$ mkdir /tmp/view
$ gitviewfs /tmp/view $GOPATH/src/github.com/josh-newman/gitviewfs &
$ find /tmp/view -maxdepth 3
/tmp/view
/tmp/view/refs
/tmp/view/refs/heads
/tmp/view/refs/heads/master
/tmp/view/refs/remotes
/tmp/view/refs/remotes/origin
$ head -n 1 /tmp/view/refs/heads/master/README.md
# gitviewfs
- Figure out if pathfs function implementations should pay attention to
fuse.Context
. Should it implement some access control? - Consider using nodefs instead of pathfs; gitviewfs already has a node abstraction internally.
- Do something with git submodules (show their contents recursively?).
- Access times.
- Memory-efficient file reading.
- Support Git LFS.
- Consider adding FUSE options for mounting only some branches, etc.
- Consider adding FUSE view into git history, in some way.
- Tests.