(repoRoot: string, branch: string)
| 90 | } |
| 91 | |
| 92 | async function branchExists(repoRoot: string, branch: string): Promise<boolean> { |
| 93 | try { |
| 94 | await runGit(['show-ref', '--verify', `refs/heads/${branch}`], repoRoot); |
| 95 | return true; |
| 96 | } catch { |
| 97 | return false; |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | export async function createWorktree(options: { |
| 102 | basePath: string; |
no test coverage detected