MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / pack

Function pack

e2e/fixtures/custom-tools-git/generate.ts:122–130  ·  view source on GitHub ↗
(root: string, sha: string, name: string)

Source from the content-addressed store, hash-verified

120};
121
122const pack = async (root: string, sha: string, name: string) => {
123 const proc = Bun.spawnSync({
124 cmd: ["git", "pack-objects", "--stdout", "--revs"],
125 cwd: root,
126 stdin: new TextEncoder().encode(`${sha}\n`),
127 });
128 if (!proc.success) throw new Error(`git pack-objects failed: ${proc.stderr.toString()}`);
129 await writeFile(join(fixtureDir, name), proc.stdout);
130};
131
132const root = await mkdtemp(join(tmpdir(), "custom-tools-git-"));
133try {

Callers 1

generate.tsFile · 0.85

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected