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

Function stage

packages/computer/src/git/commit.test.ts:19–22  ·  view source on GitHub ↗
(name: string, content: string)

Source from the content-addressed store, hash-verified

17}
18
19async function stage(name: string, content: string) {
20 await memfs.promises.writeFile(`${DIR}/${name}`, content);
21 await git.add({ fs: memfs, dir: DIR, filepath: name });
22}
23
24async function readHead(): Promise<{
25 author: { name: string; email: string };

Callers 1

commit.test.tsFile · 0.85

Calls 2

writeFileMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected