commit | ff34af89b7ebb9d24f200b59a8378135755dc167 | [log] [tgz] |
---|---|---|
author | Han-Wen Nienhuys <hanwen@google.com> | Tue Jun 28 19:32:56 2016 +0200 |
committer | Han-Wen Nienhuys <hanwen@google.com> | Mon Aug 01 14:15:38 2016 +0200 |
tree | 649625698d98472240d9d1a54ee0d8acd63d93c3 | |
parent | 965dcb367db93f89b1bb8cc70a137d0cd4d9b8b2 [diff] |
Enable handle-less I/O again. This requires go-fuse that has patch Ia09d77eae0f1af8bce46b07f386fdda20b2ccb95. Change-Id: Ib2ef142b839a30a9415a49622f64a85bb9462021
This is a FUSE filesystem that provides light-weight, lazily downloaded, read-only checkouts of Git repositories. It is intended for use with Android.
To start the file system:
go install github.com/google/slothfs/cmd/slothfs-multifs mkdir /tmp/mnt slothfs-multifs -gitiles https://android.googlesource.com/ /tmp/mnt &
To create a workspace “ws” corresponding to the latest manifest version
go install github.com/google/slothfs/cmd/slothfs-expand-manifest slothfs-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/slothfs/cmd/slothfs-populate mkdir -p checkout/frameworks cd checkout/frameworks git clone https://android.googlesource.com/platform/frameworks/base cd ../ slothfs-populate -ro /tmp/mnt/ws .
The filesystem daemon uses an on-disk cache, which by default is stored under ~/.cache/slothfs
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": false}]
A more elaborate configuration file is included as android.json
.
By default, slothfs loads the configuration from =$HOME/.config/slothfs/clone.json=.
This is not an official Google product.