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

Function pushWith

packages/computer/src/git/network.ts:237–260  ·  view source on GitHub ↗
(opts: PushWithDeps)

Source from the content-addressed store, hash-verified

235}
236
237export async function pushWith(opts: PushWithDeps): Promise<PushResult> {
238 const dir = opts.dir ?? "/";
239 try {
240 return await opts.git.push({
241 fs: opts.fs,
242 http: opts.http,
243 dir,
244 url: opts.url,
245 remote: opts.remote,
246 ref: opts.ref,
247 remoteRef: opts.remoteRef,
248 force: opts.force,
249 delete: opts.delete,
250 headers: opts.headers,
251 onAuth: opts.onAuth,
252 onProgress: opts.onProgress,
253 onMessage: opts.onMessage,
254 cache: opts.cache,
255 });
256 } catch (cause) {
257 if (isNotARepositoryCause(cause)) throw new NotARepositoryError(dir, { cause });
258 throw new GitError("EPUSHFAIL", `git push failed: ${errorMessage(cause)}`, { cause });
259 }
260}
261
262// ---------------------------------------------------------------
263// pull

Callers 2

network.test.tsFile · 0.85
pushFunction · 0.85

Calls 3

isNotARepositoryCauseFunction · 0.85
errorMessageFunction · 0.70
pushMethod · 0.65

Tested by

no test coverage detected