Add no-bootstrap option for fast worktree clones - #38699
Conversation
📋 Code Owners Summary2 file(s) changed, 2 with assigned owners 1 team(s) affected: Owners and Their Files
|
| args.push('-D') | ||
| } | ||
|
|
||
| if (program.bootstrap === false) { |
There was a problem hiding this comment.
it's not great that we have to do this in two places, this needs a follow-up
|
|
||
| if (program.bootstrap === false) { | ||
| args.push('--no-bootstrap') | ||
| } |
There was a problem hiding this comment.
Running vendor/depot_tools/gclient-new-workdir.py [repo] [workdir] --use-git-worktree --no-copy-on-write --max-depth 4 gives you a full (almost) recursive worktree checkout and then pnpm run init --nohooks --no-bootstrap syncs up the repo after checkout out the correct brave-core branch
this workflow with gclient-new-workdir.py only makes sense if you're working on a chromium repo directly.
for brave development you should have gitcache configured and create worktrees from src/brave, the gitcache will do the rest.
allowing --no-bootstrap makes no sense to me at all - if you configured gitcache, then you use it everywhere. Just make sure you don't misconfigure it in any new worktree you add.
here's a script to have multiple brave checkout with gitcache, siso cache and vpython cache all shared automatically (run without args first time, then pass worktree name via first arg): https://gist.github.com/goodov/4d1c8721ec7059621b25594dfe611b02
There was a problem hiding this comment.
I added this for a very specific purpose which is to run presubmit and gn checks only for bot PRs. This creates a very fast and space efficient checkout. Significant time and download is wasted for bootstrap.
This is useful for bots that need to create worktrees for running presubmit, etc...
Running
vendor/depot_tools/gclient-new-workdir.py [repo] [workdir] --use-git-worktree --no-copy-on-write --max-depth 4gives you a full (almost) recursive worktree checkout and thenpnpm run init --nohooks --no-bootstrapsyncs up the repo after checkout out the correct brave-core branch