commit | 4e71a6c64ba07c389a4439a20d290bc37a543976 | [log] [tgz] |
---|---|---|
author | Han-Wen Nienhuys <hanwen@google.com> | Thu Jul 14 18:16:44 2016 +0200 |
committer | Han-Wen Nienhuys <hanwen@google.com> | Mon Jul 18 07:49:34 2016 +0200 |
tree | 8163e0da18ed4747e85bfafe3035f3ed76f464fe | |
parent | f1a04b5085542827c84ba421c10d29d6986dd8ca [diff] |
Handle symlinks in populate: * Accept but ignore Utimens() on directory nodes. This is for symlinks to include/ directories * Return added and changed files separately. This is so we don't touch everything for a sloth-populate call into an empty workspace. * Cleanup e2e test code, and add a case for a changing symlink. Change-Id: I743b9887182077bf9c63d660031b92823fbeb1f8
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
.
This is not an official Google product.