(opts: BranchDeleteWithDeps)
| 90 | } |
| 91 | |
| 92 | export async function branchDeleteWith(opts: BranchDeleteWithDeps): Promise<void> { |
| 93 | const dir = opts.dir ?? "/"; |
| 94 | try { |
| 95 | await opts.git.deleteBranch({ fs: opts.fs, dir, ref: opts.name }); |
| 96 | } catch (cause) { |
| 97 | if (isNotARepositoryCause(cause)) throw new NotARepositoryError(dir, { cause }); |
| 98 | throw new GitError("EBRANCHFAIL", `git branch -d failed: ${errorMessage(cause)}`, { |
| 99 | cause, |
| 100 | }); |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | export interface GitBranchListOptions { |
| 105 | dir?: string; |
no test coverage detected