https://github.com/zlikavac32/grofs
Simple Git Read-Only File System
https://github.com/zlikavac32/grofs
fuse git libgit2
Last synced: 21 days ago
JSON representation
Simple Git Read-Only File System
- Host: GitHub
- URL: https://github.com/zlikavac32/grofs
- Owner: zlikavac32
- License: mit
- Created: 2019-01-18T18:18:42.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-05T09:19:29.000Z (over 6 years ago)
- Last Synced: 2025-07-10T16:45:48.652Z (4 months ago)
- Topics: fuse, git, libgit2
- Language: C
- Size: 55.7 KB
- Stars: 13
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Grofs - Git Read-Only FS
Simple FUSE implementation that exposes git repository as a file system. It's still in the early development so don't use it in production.
## Install
Before build, make sure you have `libgit2`, `fuse2`, `pkgconf` and `make` (tested with GNU make) installed.
Clone this repository and run `make && sudo make install`.
## Usage
Run `grofs ` to mount git repository.
Virtualized file system has following structure
```
/
commits/
commit1-sha1/
tree/
... - tree for that commit as if you did git checkout commit1-sha1
parent - file that contains SHA1 of the parent (no file if no parrent)
commit2-sha1/
...
...
commitn-sha1/
...
blobs/
blob1-sha1 - contains content for blob blob1-sha1
blob2-sha1
...
blobn-sha1
```
Some more rules
- file `parent` is always of size 40
- files representing blob have their size set to the size of raw blob content
- folders representing commits (like `commit1-sha1` in the example above) have commit time as their create and modified time
- every other file system item has `grofs` start time as create and modified time
## Further development
- Possibility to specify remote which is exposed
- More virtualized files/folders like commit author, message, etc.