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

Function stashPushWith

packages/computer/src/git/worktree.ts:43–51  ·  view source on GitHub ↗
(opts: StashPushWithDeps)

Source from the content-addressed store, hash-verified

41}
42
43export async function stashPushWith(opts: StashPushWithDeps): Promise<void> {
44 const dir = opts.dir ?? "/";
45 try {
46 await opts.git.stash({ fs: opts.fs, dir, op: "push", message: opts.message });
47 } catch (cause) {
48 if (isNotARepositoryCause(cause)) throw new NotARepositoryError(dir, { cause });
49 throw new GitError("ESTASHFAIL", `git stash push failed: ${errorMessage(cause)}`, { cause });
50 }
51}
52
53export interface StashListWithDeps extends BaseWorktreeOptions {
54 git: IsomorphicGitStashClient;

Callers 2

stashPushFunction · 0.85
worktree.test.tsFile · 0.85

Calls 3

isNotARepositoryCauseFunction · 0.85
stashMethod · 0.80
errorMessageFunction · 0.70

Tested by

no test coverage detected