(opts: BranchListWithDeps)
| 111 | } |
| 112 | |
| 113 | export async function branchListWith(opts: BranchListWithDeps): Promise<string[]> { |
| 114 | const dir = opts.dir ?? "/"; |
| 115 | try { |
| 116 | return await opts.git.listBranches({ fs: opts.fs, dir }); |
| 117 | } catch (cause) { |
| 118 | if (isNotARepositoryCause(cause)) throw new NotARepositoryError(dir, { cause }); |
| 119 | throw new GitError("EBRANCHFAIL", `git branch list failed: ${errorMessage(cause)}`, { |
| 120 | cause, |
| 121 | }); |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | // --------------------------------------------------------------- |
| 126 | // tag |
no test coverage detected