A folder for every commit in your git repository, served over NFSv3.
Rust port of jvns/git-commit-folders.
The Go original supports FUSE, NFS, and WebDAV; this port is NFS-only and uses
fractal-nfs and
gix. The on-disk layout matches the Go
version, so the upstream
README is the
authoritative tour of the directory structure.
cargo build --releaseThe binary starts an NFS server, then mount(8)s it onto your chosen
mountpoint. Mounting needs root, so:
sudo ./target/release/git-commit-folders \
--mountpoint /tmp/mnt \
--repo /path/to/your/repoIf you'd rather run the server unprivileged and mount it yourself:
./target/release/git-commit-folders \
--mountpoint /tmp/mnt \
--repo /path/to/your/repo \
--no-mount
# in another shell:
sudo mount -o port=12000,mountport=12000,vers=3,tcp,nolock,soft,intr \
-t nfs localhost:/ /tmp/mntFlags:
| Flag | Default | Description |
|---|---|---|
--mountpoint <PATH> |
required | Directory to mount onto (created if absent) |
--repo <PATH> |
. |
Path to the git repository |
--port <PORT> |
12000 |
TCP port for NFS + MOUNT (single port, no portmapper) |
--threads <N> |
num CPUs | NFS listener threads (each with its own runtime + SO_REUSEPORT socket) |
--no-mount |
off | Start the server only; you run mount yourself |
/tmp/mnt
├── branches/ # symlinks → commits/<XX>/<XXXX>/<full-hash>
├── tags/ # symlinks → commits/<XX>/<XXXX>/<full-hash>
├── branch_histories/ # one dir per branch, last 100 commits as numbered symlinks
└── commits/ # every commit, indexed by 2- then 4-char hash prefix
└── c8/c801/c801dcaa777b9d94a4fc30f0b670936a6403eadd/
└── <files at that commit>
Same trick the Go version describes: you can grep across history, e.g.
cd /tmp/mnt/branch_histories/main
grep -l 'fn read_blob' */src/*.rs- Read-only.
- NFSv3 over TCP only; no Kerberos, no portmapper. Mount with explicit
port=andmountport=. - Linux/macOS only (relies on
mount -t nfs). - The commits index is cached in memory and refreshed at most once a minute; new loose commits show up on the next refresh, packed objects are scanned once at process start.
Apache-2.0.