-
Update to git 2.16
-
Setup file monitoring with hgwatchman
- Run
$ brew install watchman $ cd /path/to/mozilla-central $ watchman watch-project .
- Download my slightly modified version of the default git fsmonitor-watchman hook from here and put it at
.git/hooks/fsmonitor-watchman
. - Run
git config --local core.fsmonitor ".git/hooks/fsmonitor-watchman"
-
Enable git's split-index feature
- Run
$ git update-index --split-index $ git config --system core.splitIndex true
- Optionally, run
git config --local splitIndex.maxPercentChange 10
. The default is 20, which is too high for repos the size of gecko. YMMV for a good value, you can also skip this and rungit update-index --split-index
whenever things start getting slow to force it to re-split the index.
-
Enable git's untracked file cache
- Run
git update-index --test-untracked-cache
. If it tells you you can, then - Run
git update-index --untracked-cache
, andgit config --system core.untrackedCache true
.
- Run
-
If you still have a slow prompt, it's probably computing modifications in a bad way. Parsing them out of
git status --porcelain
is the fastest, but many usegit diff --name-only
or similar, which is very slow.
Created
January 19, 2018 19:14
-
-
Save thomcc/4c23eeed3b248394bffa0bff04f5c00b to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment