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) <noreply@anthropic.com>
This commit is contained in:
Lex Christopherson 2026-03-21 10:15:29 -06:00
parent 1c696c6f56
commit 69c0e84b24

View file

@ -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();