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

Function stashPopWith

packages/computer/src/git/worktree.ts:80–88  ·  view source on GitHub ↗
(opts: StashPopWithDeps)

Source from the content-addressed store, hash-verified

78}
79
80export async function stashPopWith(opts: StashPopWithDeps): Promise<void> {
81 const dir = opts.dir ?? "/";
82 try {
83 await opts.git.stash({ fs: opts.fs, dir, op: "pop", refIdx: opts.index ?? 0 });
84 } catch (cause) {
85 if (isNotARepositoryCause(cause)) throw new NotARepositoryError(dir, { cause });
86 throw new GitError("ESTASHFAIL", `git stash pop failed: ${errorMessage(cause)}`, { cause });
87 }
88}
89
90// ---------------------------------------------------------------
91// reset

Callers 2

stashPopFunction · 0.85
worktree.test.tsFile · 0.85

Calls 3

isNotARepositoryCauseFunction · 0.85
stashMethod · 0.80
errorMessageFunction · 0.70

Tested by

no test coverage detected