MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / write

Function write

__tests__/git-status-subdir-project.test.ts:31–34  ·  view source on GitHub ↗
(rel: string, body: string)

Source from the content-addressed store, hash-verified

29 const git = (...args: string[]) =>
30 cp.execFileSync('git', args, { cwd: repo, encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'] }) as string;
31 const write = (rel: string, body: string) => {
32 fs.mkdirSync(path.dirname(path.join(repo, rel)), { recursive: true });
33 fs.writeFileSync(path.join(repo, rel), body);
34 };
35 git('init', '-q');
36 git('config', 'user.email', 'test@example.invalid');
37 git('config', 'user.name', 'Test');

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected