(input: { worktreeRoot: string; repoRoot: string })
| 147 | } |
| 148 | |
| 149 | function managedWorktreePath(input: { worktreeRoot: string; repoRoot: string }): string { |
| 150 | const repoName = sanitizePathSegment(basename(input.repoRoot)) || "repo"; |
| 151 | const worktreeId = randomBytes(4).toString("hex"); |
| 152 | return join(input.worktreeRoot, `${repoName}-${worktreeId}`); |
| 153 | } |
| 154 | |
| 155 | function sanitizePathSegment(value: string): string { |
| 156 | return value |
no test coverage detected