fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

10K
active users

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?

Wez Furlong :terminal:

@b0rk the EdenFS portion of Sapling (github.com/facebook/sapling/) has the guts of this inside. Even though that project was built primarily for Sapling (an evolution of Mercurial), it can also mount Git repos. We talked about exposing literally the interface your described for some internal infrastructure in the early days. I'm no longer part of that team so I'm not sure if that ever got implemented, but it wouldn't be difficult if someone was motivated!

GitHubGitHub - facebook/sapling: A Scalable, User-Friendly Source Control System.A Scalable, User-Friendly Source Control System. Contribute to facebook/sapling development by creating an account on GitHub.

@wez @b0rk Doesn’t SVN kind of work like this?

@ramsey @b0rk SVN!? You could mount it via DAV. Someone probably wrote a FUSE DAV implementation, but I'm not sure if anyone sat down to expose individual revisions.

@b0rk while I'm remembering stuff, there was also a precursor internal project called `gvfs` (git view filesystem) that also had this interface. Reading the root directory showed no entries (because there were too many commits and `ls` needs to stat everything by default -> too costly), but you could cd/ls into a commit hash and see the tree at that commit. That was used to serve up commits for some internal build infrastructure.

@wez thanks! i guess that wasn't open sourced?