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

Function git

__tests__/git-status-subdir-project.test.ts:29–30  ·  view source on GitHub ↗
(...args: string[])

Source from the content-addressed store, hash-verified

27function makeRepo(prefix: string): { repo: string; git: (...args: string[]) => string; write: (rel: string, body: string) => void } {
28 const repo = fs.realpathSync(fs.mkdtempSync(path.join(os.tmpdir(), prefix)));
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);

Callers 2

makeRepoFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected