feat(settings): choose how new worktrees initialize submodules (#12955)

Co-authored-by: Claude Fable 5 <[email protected]>
This commit is contained in:
Julius MarmingeandClaude Fable 5 authored and GitHub committed 2026-09-21 18:15:07 -07:00
1 parent 742173a132
commit 0141bc2bf5
18 files changed
+331 -55

No files matched your search

+14 -5
View File
@@ -2543,11 +2543,20 @@ export const make = Effect.gen(function* () {
});
}
const worktree = yield* gitCore.createWorktree({
cwd: input.cwd,
refName: localPullRequestBranch,
path: null,
});
const worktree = yield* gitCore.createWorktree(
{
cwd: input.cwd,
refName: localPullRequestBranch,
path: null,
},
{
// Best effort: a settings read failure falls back to the checkout's t3.json.
submodules: yield* projectSettingsFor(input).pipe(
Effect.map((settings) => settings.worktreeSubmodules),
Effect.orElseSucceed(() => null),
),
},
);
yield* ensureExistingWorktreeUpstream(worktree.worktree.path);
yield* maybeRunSetupScript(worktree.worktree.path);