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

Function pruneMergedWorktrees

engine/src/kild/worktree.ts:168–177  ·  view source on GitHub ↗
(
  repo: string,
  keep: Set<string> = new Set(),
)

Source from the content-addressed store, hash-verified

166 throw err;
167 }
168 return attached;
169}
170
171export async function listWorktrees(repo: string): Promise<Worktree[]> {
172 const { stdout } = await execFile('git', ['-C', repo, 'worktree', 'list', '--porcelain']);
173 const trees: Worktree[] = [];
174 let cur: Partial<Worktree> = {};
175 const push = () => {
176 if (!cur.path) return;
177 const branch = cur.branch ?? '(detached)';
178 trees.push({
179 path: cur.path,
180 branch,

Callers 3

worktreeFunction · 0.90
server.tsFile · 0.90

Calls 2

doPruneMergedFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected