MCPcopy Create free account
hub / github.com/Wirasm/kild / removeWorktree

Function removeWorktree

engine/src/kild/worktree.ts:132–134  ·  view source on GitHub ↗
(repo: string, wtPath: string)

Source from the content-addressed store, hash-verified

130 const wtPath = worktreePath(name);
131 const ref = worktreeRef(name);
132 const attached = { branch: ref, path: wtPath, name };
133 if (existsSync(wtPath)) {
134 // Attach only to a real linked worktree (the `.git` pointer file). A leftover or
135 // corrupt dir must NOT silently become a non-isolated cwd — fail fast instead.
136 if (existsSync(path.join(wtPath, '.git'))) return attached;
137 throw new Error(`worktree path exists but is not a git worktree: ${wtPath}`);

Callers 3

worktreeFunction · 0.90
server.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected