From 69c0e84b240de992098c4ac81ad61d07a89abce8 Mon Sep 17 00:00:00 2001 From: Lex Christopherson Date: Sat, 21 Mar 2026 10:15:29 -0600 Subject: [PATCH] fix: increase resolveProjectRootFromGitFile walk-up limit from 10 to 30 The test creates a worktree path 11 levels deep, exceeding the 10-level walk-up limit. In CI, the deep resolved path through a symlinked .gsd fails to find the .git file and returns the raw path instead of the project root. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/resources/extensions/gsd/worktree.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/resources/extensions/gsd/worktree.ts b/src/resources/extensions/gsd/worktree.ts index b38cabacd..6d089f92d 100644 --- a/src/resources/extensions/gsd/worktree.ts +++ b/src/resources/extensions/gsd/worktree.ts @@ -172,7 +172,7 @@ function resolveProjectRootFromGitFile(worktreePath: string): string | null { try { // Walk up from the worktree path to find the .git file let dir = worktreePath; - for (let i = 0; i < 10; i++) { + for (let i = 0; i < 30; i++) { const gitPath = join(dir, ".git"); if (existsSync(gitPath)) { const content = readFileSync(gitPath, "utf8").trim();