Conversation
New worktrees still initialize submodules by default. Repos that only need a subset can set initSubmodulesOnWorktreeCreate to false and run git submodule update from a runOnWorktreeCreate script instead.
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR adds an explicit, tested t3.json option that can suppress recursive submodule initialization during production worktree creation while preserving the existing default. Because it changes shared VCS behavior and the author is new to the touched areas, human review is warranted. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (7)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe project file schema now supports ChangesWorktree submodule initialization
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant GitVcsDriverCore
participant parseT3ProjectFile
participant git
GitVcsDriverCore->>git: Add worktree
GitVcsDriverCore->>parseT3ProjectFile: Parse t3.json
parseT3ProjectFile-->>GitVcsDriverCore: Return submodule initialization setting
GitVcsDriverCore->>git: Run recursive submodule update when enabled
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The new opt-out preserves existing submodule initialization by default and has coverage for both default and disabled behavior. No actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Problem
After #7674, creating a worktree always runs
git submodule update --init --recursive. That is the right default when a repo keeps skills or shared tooling in a submodule, but it is expensive for repositories with many submodules that only need a subset in each worktree. There is no project-level way to skip the built-in step.Change
Add optional
initSubmodulesOnWorktreeCreatetot3.json.true: keep today's behaviorfalse: skip the automatic submodule checkout increateWorktreeRepos that want a subset can initialize it from a
runOnWorktreeCreateaction. Set that action'sasyncfield tofalseif the agent should wait until those submodules exist.The flag is read from the new worktree's
t3.json, so thread worktrees, PR worktrees, and the raw RPC all honor it.Tests
t3.jsonwithfalseleaves the submodule emptyModel: Grok 4.6 via T3 Code / Grok Build.
Summary by CodeRabbit
New Features
initSubmodulesOnWorktreeCreateproject setting to control whether submodules are initialized automatically when creating a worktree.falseskips the automatic checkout.Documentation