(repoRoot: string)
| 206 | } |
| 207 | |
| 208 | export 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: |
no test coverage detected