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

Function commit

packages/computer/src/git/worktree.test.ts:35–39  ·  view source on GitHub ↗
(name: string, content: string, message: string)

Source from the content-addressed store, hash-verified

33}
34
35async function commit(name: string, content: string, message: string): Promise<string> {
36 await memfs.promises.writeFile(`${DIR}/${name}`, content);
37 await git.add({ fs: memfs, dir: DIR, filepath: name });
38 return git.commit({ fs: memfs, dir: DIR, message, author: AUTHOR });
39}
40
41async function statusOf(path: string): Promise<[number, number, number] | undefined> {
42 const matrix = await git.statusMatrix({ fs: memfs, dir: DIR });

Callers 1

worktree.test.tsFile · 0.70

Calls 3

writeFileMethod · 0.65
addMethod · 0.65
commitMethod · 0.65

Tested by

no test coverage detected