Skip to content

Turn a whole git repo (branches and tags) into a filesystem with FUSE

License

Notifications You must be signed in to change notification settings

andys/gitrepofs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

GitRepoFS
=========

This is my attempt at making a git repository FUSE-based filesystem.

Unlike the other similar ones out there, it lets you "cd" into any tag or
branch and see your data in there as if you had just checked out a fresh
copy of that branch.

(In theory it could be made to support individual commits. It could also be
made writeable somehow, perhaps using rename of the parent dir to signal a
commit?)


Limitations
===========

Slashes in tag/branch names are turned into backslashes in the filesystem.

The directory entries have correct file size but bogus date and owner.

This is currently a filthy hack, that I whipped up in a couple of hours
using much cutting and pasting.  It needs to be cleaned up (and perhaps even
rewritten it in C).



Dependencies
============

rugged gem - for accessing git
RubyFuse gem - for Fuse. 

nb. It took me a while to get these compiled on Ruby 1.9, so Ruby 1.8 is
probably the best bet for now.



Example Usage:
=============


mkdir myrepo
usermount -u myrepo  # ensure it is unmounted from previous sessions
ruby gitrepofs.rb /path/to/git/repo/ myrepo

ls -la myrepo 

dr-xr-xr-x 1 user user 4096 Apr 29 13:41 .
drwxrwxr-x 3 user user   61 Apr 29 13:41 ..
dr-xr-xr-x 1 user user 4096 Apr 29 13:41 heads
dr-xr-xr-x 1 user user 4096 Apr 29 13:41 tags




Author
======

Andrew Snow
<andrew@modulus.org>

About

Turn a whole git repo (branches and tags) into a filesystem with FUSE

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages