Skip to content

Commit aff29bd

Browse files
fix(server): submodule init in new worktrees no longer times out after 30 s
`git submodule update --init` in createWorktree ran under the generic 30 s Git timeout, so repositories with many or slow submodules had the clone killed mid-way and ended up with empty submodule paths. It now gets the same WORKTREE_ADD_TIMEOUT_MS bound as `git worktree add`, which also takes it out of the shared Git process semaphore like the checkout. The bound stays finite so unattended worktree setup cannot hang on a stalled clone. Fixes #26390 Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent bd9026d commit aff29bd

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

‎apps/server/src/vcs/GitVcsDriverCore.ts‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3914,12 +3914,15 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
39143914
submoduleMode.value === "recursive"
39153915
? ["submodule", "update", "--init", "--recursive"]
39163916
: ["submodule", "update", "--init"],
3917-
onSubmoduleLine
3918-
? {
3919-
env: { LC_ALL: "C" },
3920-
progress: { onStdoutLine: onSubmoduleLine, onStderrLine: onSubmoduleLine },
3921-
}
3922-
: {},
3917+
{
3918+
timeoutMs: WORKTREE_ADD_TIMEOUT_MS,
3919+
...(onSubmoduleLine
3920+
? {
3921+
env: { LC_ALL: "C" },
3922+
progress: { onStdoutLine: onSubmoduleLine, onStderrLine: onSubmoduleLine },
3923+
}
3924+
: {}),
3925+
},
39233926
),
39243927
),
39253928
Effect.matchEffect({

0 commit comments

Comments
 (0)