Notify kernel of creation of new workspace multifs.

To test this, set attribute/entry TTLs of the test mount.

Change-Id: I31c92e3a5f046a720171703b2d61d069d8f54549
2 files changed
tree: 294284826131a5029964ceb884a090acd4221164
  1. cache/
  2. cmd/
  3. fs/
  4. gitiles/
  5. manifest/
  6. .gitignore
  7. all.bash
  8. android.json
  9. CONTRIBUTING
  10. design.md
  11. LICENSE
  12. README.md
README.md

This is a FUSE filesystem that provides light-weight, read-only checkouts of Git repositories. It is intended for use with Android.

How to use

To start the file system:

go install github.com/google/gitfs/cmd/gitfs-multifs
mkdir /tmp/mnt
gitfs-multifs -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

Configuring

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.

DISCLAIMER

This is not an official Google product.