commit | 237db390626c1e1b1246e147c61e0c3b181b5a7f | [log] [tgz] |
---|---|---|
author | Han-Wen Nienhuys <hanwen@google.com> | Wed Jun 22 22:21:36 2016 +0200 |
committer | Han-Wen Nienhuys <hanwen@google.com> | Wed Jun 22 22:21:36 2016 +0200 |
tree | 1001fed4912425b58f0a331832ca531af64b97ce | |
parent | bde4544220e6fee13934dc5a676f336c4e5b82f4 [diff] |
Add cmd/gitfs-populate. This program completes a partial checkout using symlinks to the readonly mount. Change-Id: I7188a1a66501968da0ea4bebdddff39183ebe33e
This is a FUSE filesystem that provides light-weight, read-only checkouts of Android.
To start,
go install github.com/google/gitfs/cmd/gitfs-{multifs,expand-manifest} gitfs-expand-manifest --gitiles https://android.googlesource.com/ \ > /tmp/m.xml mkdir /tmp/mnt gitfs-multifs -cache /tmp/cache -gitiles https://android.googlesource.com/ /tmp/mnt &
then, in another terminal, execute
ln -s /tmp/m.xml /tmp/mnt/config/ws
To create a workspace “ws” corresponding to the manifest in m.xml.
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.