(options: {
repoRoot: string;
worktreePath: string;
})
| 163 | } |
| 164 | |
| 165 | export async function removeWorktree(options: { |
| 166 | repoRoot: string; |
| 167 | worktreePath: string; |
| 168 | }): Promise<RemoveWorktreeResult> { |
| 169 | try { |
| 170 | await runGit(['worktree', 'remove', '--force', options.worktreePath], options.repoRoot); |
| 171 | return { ok: true }; |
| 172 | } catch (error) { |
| 173 | const message = error instanceof Error ? error.message : String(error); |
| 174 | return { ok: false, error: message }; |
| 175 | } |
| 176 | } |
no test coverage detected