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

Function runRefDiff

packages/computer/src/git/diff.test.ts:164–175  ·  view source on GitHub ↗
(opts: { ref: string; to: string; paths?: string[] })

Source from the content-addressed store, hash-verified

162 beforeEach(() => vol.reset());
163
164 async function runRefDiff(opts: { ref: string; to: string; paths?: string[] }): Promise<string> {
165 return diffWith({
166 git: isomorphicGit,
167 fs: memfs,
168 createPatch,
169 readFile: (path) => memfs.promises.readFile(path) as Promise<Uint8Array | string>,
170 dir: DIR,
171 ref: opts.ref,
172 to: opts.to,
173 paths: opts.paths,
174 });
175 }
176
177 it("diffs committed -> committed, ignoring the working tree", async () => {
178 await init();

Callers 1

diff.test.tsFile · 0.85

Calls 2

diffWithFunction · 0.85
readFileMethod · 0.65

Tested by

no test coverage detected