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

Function stagedPaths

packages/computer/src/git/worktree.ts:182–189  ·  view source on GitHub ↗
(opts: ResetWithDeps, dir: string)

Source from the content-addressed store, hash-verified

180}
181
182async function stagedPaths(opts: ResetWithDeps, dir: string): Promise<string[]> {
183 const matrix = await opts.git.statusMatrix({ fs: opts.fs, dir, cache: opts.cache });
184 const paths: string[] = [];
185 for (const [filepath, head, _workdir, stage] of matrix) {
186 if (stage !== head) paths.push(filepath);
187 }
188 return paths;
189}
190
191// ---------------------------------------------------------------
192// clean

Callers 1

resetWithFunction · 0.85

Calls 2

statusMatrixMethod · 0.65
pushMethod · 0.65

Tested by

no test coverage detected