MCPcopy
hub / github.com/garrytan/gstack / constructor

Method constructor

lib/worktree.ts:100–112  ·  view source on GitHub ↗
(repoRoot?: string)

Source from the content-addressed store, hash-verified

98 private harvestResults: HarvestResult[] = [];
99
100 constructor(repoRoot?: string) {
101 if (repoRoot) {
102 this.repoRoot = repoRoot;
103 } else {
104 this.repoRoot = git(['rev-parse', '--show-toplevel'], process.cwd());
105 }
106 this.runId = crypto.randomUUID();
107
108 // Register cleanup on process exit
109 process.on('exit', () => {
110 this.cleanupAll();
111 });
112 }
113
114 /** Create an isolated worktree. Returns the worktree path. Throws on failure. */
115 create(testName: string): string {

Callers

nothing calls this directly

Calls 2

cleanupAllMethod · 0.95
gitFunction · 0.70

Tested by

no test coverage detected