MCPcopy
hub / github.com/coder/mux / pruneWorktrees

Function pruneWorktrees

src/node/git.ts:265–277  ·  view source on GitHub ↗
(projectPath: string)

Source from the content-addressed store, hash-verified

263}
264
265export async function pruneWorktrees(projectPath: string): Promise<WorktreeResult> {
266 // Clean up stale lock before git operations on main repo
267 cleanStaleLock(projectPath);
268
269 try {
270 using proc = execFileAsync("git", ["-C", projectPath, "worktree", "prune"]);
271 await proc.result;
272 return { success: true };
273 } catch (error) {
274 const message = getErrorMessage(error);
275 return { success: false, error: message };
276 }
277}

Callers

nothing calls this directly

Calls 3

execFileAsyncFunction · 0.90
getErrorMessageFunction · 0.90
cleanStaleLockFunction · 0.85

Tested by

no test coverage detected