MCPcopy Index your code
hub / github.com/garrytan/gstack / cleanupRepo

Function cleanupRepo

test/worktree.test.ts:41–45  ·  view source on GitHub ↗

Clean up a test repo.

(dir: string)

Source from the content-addressed store, hash-verified

39
40/** Clean up a test repo. */
41function cleanupRepo(dir: string): void {
42 // Prune worktrees first to avoid git lock issues
43 spawnSync('git', ['worktree', 'prune'], { cwd: dir, stdio: 'pipe' });
44 fs.rmSync(dir, { recursive: true, force: true });
45}
46
47// Track repos to clean up
48const repos: string[] = [];

Callers 1

worktree.test.tsFile · 0.85

Calls 1

spawnSyncFunction · 0.85

Tested by

no test coverage detected