Mounting Git commits as folders with NFS
37 points
2 days ago
| 10 comments
| jvns.ca
| HN
thewisenerd
1 hour ago
[-]
> None of these are the most efficient way to do this (you can use git show and git log -S or maybe git grep to accomplish something similar), but personally I always forget the syntax and navigating a filesystem feels easier to me.

i feel like some of the old-school commands will benefit from long args, e.g., '--search'. at the time of writing, the current `git log` documentation[1]'s `-S' has _one_ instance of the word 'search'.

(un)related to the article, author went on to contribute documentation updates to git, which were much needed [2]

[1]: https://git-scm.com/docs/git-log#Documentation/git-log.txt--... [2]: https://jvns.ca/blog/2026/01/08/a-data-model-for-git/

reply
js2
54 minutes ago
[-]
What, you didn't know to search for pickaxe!? :-)

Meanwhile, --grep searches the log message. Yeah, the git CLI is an ergonomic nightmare and I've been using it since the very beginning.

FWIW, I can't think of a single time I've wanted to use -S instead of -G.

reply
chungy
1 hour ago
[-]
Related: Fossil has a `fusefs` subcommand: https://fossil-scm.org/home/help/fusefs

The DIRECTORY/checkins/ directory doesn't list out anything by itself, but you can look things up by any of the supported checkin names (hash, tag, branch, date...): https://fossil-scm.org/home/doc/trunk/www/checkin_names.wiki

reply
deepspace
9 minutes ago
[-]
The dot-com era called. They want ClearCase back.
reply
Someone
2 days ago
[-]
FTA: “problem 1: webdav or NFS?

The two filesystems I could that were natively supported by Mac OS were WebDav and NFS. I couldn’t tell which would be easier to implement so I just tried both”

I might find out that it is incomplete, buggy or a nuisance to use, but FSKit (https://developer.apple.com/documentation/FSKit) would be my first choice.

reply
blaz0
1 hour ago
[-]
macOS actually has an excellent SMB client, so the options actually are: WebDAV, NFS (3.0 and 4.0), SMB, FSKit.
reply
oefrha
1 hour ago
[-]
By excellent do you mean bearable? macOS’s SMB stack is certainly not excellent.
reply
nine_k
22 minutes ago
[-]
Won't the SMB implementation be sufficient to mount git commits as folders?
reply
adi_kurian
43 minutes ago
[-]
By bearable do you mean it exists? It's fucking shite.
reply
donatj
14 minutes ago
[-]
Which is why I'm so angry they're killing AFP. It works so much better and is super easy to set up a server for on a Linux
reply
js2
44 minutes ago
[-]
AFAIK, SMB doesn't support symbolic links.
reply
pvtmert
2 days ago
[-]
Given the advent of LLMs and agentic coding, I believe this article needs re-visiting as it makes it much more discoverable to compare individual files across commits.
reply
ramses0
30 minutes ago
[-]
This is my favorite cursed finding: https://github.com/zevweiss/booze

FUSE-bindings for "filesystems in bash", eg:

https://github.com/zevweiss/booze/blob/master/cowsayfs.sh#L5...

    cs_read()
    {
      if ! [[ "$1" =~ ^/($cowpat)/[^/]+$ ]]; then
        booze_err=-$EINVAL
        return 1
      elif [ "$3" != 0 ]; then
        return 0
      fi

      local msg="${1#/*/}"
      local cow="${1#/}"
      cow="${cow%%/*}"
      cowsay -f "$cow" "$msg"
    }
...I think that WebDAV is "the way" compared to FUSE, but I'm always intrigued by the idea of virtual filesystems as an implementation face.
reply
everybodyknows
5 minutes ago
[-]
[delayed]
reply
ulrischa
53 minutes ago
[-]
Nice idea. But when taking commits as folders one should delete, add and remame files in the folder and that is not possible in a commit because it creates another commit. So I think this is nit the right mental model
reply
wtallis
49 minutes ago
[-]
Files and folders can be read-only, a concept that has been around for about as long as the folders abstraction itself.
reply
steveBK123
1 hour ago
[-]
NFS.. stop right there
reply
mmh0000
23 minutes ago
[-]
You're being downvoted, but, seriously... NFS is a joke for anything outside of an enterprise setup with a bunch of ancillary support services in place.

The fact that NFSv4 has no concept of true "Authentication" and just blindly accepts whatever the client sends is the craziest network application design ever:

  Client: Hi, NFS server, I'm Bob! UID=1000
  Server: Hi Bob! Here's access to all of Bob's files! I trust you and don't need a password or anything!
  Client: Thanks!!!
Some of you may nitpick and say, "well ackkkuallyy, NFS supports authentication through GSSAPI/krb."

And to you, I say, that's crazy! Setting up Kerberos just to authenticate users for access to my Linux ISOs is a crazy large requirement! Sure, it might make sense for an enterprise that already uses Kerberos + LDAP + NFS + certificate management, but for everyone else, that's a lot of infrastructure to set up and maintain for what should be BASIC functionality.

EDIT

ALSO!!! Why the fork does NFS run as a kernel module (nfsd)!? Shouldn't that be an external daemon!? Who the heck thought any of this was a good idea!?

  <sarcasm mode> 
    Dev1: Here's a great idea! Let's run an insecure network server in Kernel space! 
    Dev2: OMG! You're so smart! Let's also exclude any encryption!!!
 </>
//end rant of an old, bitter Linux sysadmin
reply
steveBK123
59 seconds ago
[-]
So many battle scars from NFS in production for me as well.

Wish the downvoters all the best in their future NFS endeavors.

reply
chungy
13 minutes ago
[-]
Funny part is, that NFSv4 supports SIDs for user authentication, but the Linux implementation leaves it out (among all the other ACL features) simply on the basis that Linux doesn't support them at all.

The FreeBSD, Solaris, Mac OS X, and Windows (yes, even Windows) implementations of NFSv4 are fully featured with this stuff.

reply
nine_k
20 minutes ago
[-]
Does this mean that I can connect to an NFS server saying my UID=0 and get local root?
reply
mmh0000
16 minutes ago
[-]
Usually, no. NFS defaults to "root_squash," which silently changes UID=0 to the UID of the `nfsnobody` user.

However, in the /etc/exports file, you can (but shouldn't) add the share option "no_root_squash" which disables that.

So, root access is slightly protected. But all other users are wide open.

reply
cyberax
40 minutes ago
[-]
BTW, if you want a simple NFSv4 client in Go, feel free to use mine: https://github.com/Cyberax/go-nfs-client

Making it into an NFSv4 server should also be pretty easy.

reply