MCPcopy Create free account
hub / github.com/cloudflare/computer / branchListWith

Function branchListWith

packages/computer/src/git/refs.ts:113–123  ·  view source on GitHub ↗
(opts: BranchListWithDeps)

Source from the content-addressed store, hash-verified

111}
112
113export 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

Callers 2

branchListFunction · 0.85
refs.test.tsFile · 0.85

Calls 3

isNotARepositoryCauseFunction · 0.85
listBranchesMethod · 0.80
errorMessageFunction · 0.70

Tested by

no test coverage detected