MCPcopy Create free account
hub / github.com/Noumena-Network/code / getWorktreesDir

Function getWorktreesDir

src/utils/worktree.ts:208–217  ·  view source on GitHub ↗
(repoRoot: string)

Source from the content-addressed store, hash-verified

206}
207
208export function getWorktreesDir(repoRoot: string): string {
209 const canonicalDir = join(repoRoot, '.ncode', 'worktrees')
210 const legacyDir = join(repoRoot, '.claude', 'worktrees')
211
212 if (existsSync(legacyDir)) {
213 return legacyDir
214 }
215
216 return canonicalDir
217}
218
219// Flatten nested slugs (`user/feature` → `user+feature`) for both the branch
220// name and the directory path. Nesting in either location is unsafe:

Callers 3

worktreePathForFunction · 0.85
getOrCreateWorktreeFunction · 0.85

Calls 1

existsSyncFunction · 0.90

Tested by

no test coverage detected