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

Function makeRepo

__tests__/extraction-old-git.test.ts:42–50  ·  view source on GitHub ↗
(dir: string, base: string)

Source from the content-addressed store, hash-verified

40 execFileSync('git', args, { cwd, stdio: 'pipe' });
41
42 const makeRepo = (dir: string, base: string) => {
43 fs.mkdirSync(dir, { recursive: true });
44 runGit(dir, 'init', '-q');
45 runGit(dir, 'config', 'user.email', 'test@test.com');
46 runGit(dir, 'config', 'user.name', 'Test');
47 fs.writeFileSync(path.join(dir, `${base}.ts`), `export const ${base} = 1;`);
48 runGit(dir, 'add', '-A');
49 runGit(dir, 'commit', '-q', '-m', `${base} init`);
50 };
51
52 beforeEach(async () => {
53 const actual = await vi.importActual<typeof import('child_process')>('child_process');

Callers 1

Calls 2

runGitFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected