commit | 5c202df1978a942f792c2ab1da43b1b3ab5b48d3 | [log] [tgz] |
---|---|---|
author | Han-Wen Nienhuys <hanwen@google.com> | Tue Jun 28 19:15:32 2016 +0200 |
committer | Han-Wen Nienhuys <hanwen@google.com> | Thu Jun 30 17:39:44 2016 +0200 |
tree | b99e51b8acadd605f6f826ad673b928032bc5b21 | |
parent | b9e5050c8504f865990c0ab59e1923dd838b276b [diff] |
Share nodes with equal IDs between checkouts. Change-Id: I30284cd7a58f31fa8f2aa566a53fcec4d99bda25
This is a FUSE filesystem that provides light-weight, read-only checkouts of Git repositories. It is intended for use with Android.
To start the file system:
go install github.com/google/gitfs/cmd/gitfs-multifs mkdir /tmp/mnt gitfs-multifs -cache /tmp/cache -gitiles https://android.googlesource.com/ /tmp/mnt &
To create a workspace “ws” corresponding to the latest manifest version
go install github.com/google/gitfs/cmd/gitfs-expand-manifest gitfs-expand-manifest --gitiles https://android.googlesource.com/ \ > /tmp/m.xml && ln -s /tmp/m.xml /tmp/mnt/config/ws
To populate a checkout
go install github.com/google/gitfs/cmd/gitfs-populate mkdir -p checkout/frameworks cd checkout/frameworks git clone https://android.googlesource.com/platform/frameworks/base cd ../ gitfs-populate -ro /tmp/mnt/ws .
The filesystem daemon uses an on-disk cache, which by default is stored under ~/.cache/gitfs
The FUSE file system clones repositories on-demand. You can avoid cloning altogether for repositories you know you don't need. This is configured through a JSON file.
For example, if you work on Android, and build on a Linux machine, you will never need the Darwin related prebuilts. You can avoid a costly clone for those by doing:
{"Repo": ".*darwin.*", "Clone": false}
Similarly, the build system system will read files (typically called ‘*.mk’) across the entire tree. When any .mk file is opened, this should not trigger a clone. This is achieved with the following entry
{"File": ".*mk$", "Clone": false}
Together, the following config.json
file is a good start for working on android:
[{"Repo": ".*darwin.*", "Clone": false}, {"File": ".*mk$", "Clone": true}]
This is not an official Google product.