MCPcopy Create free account
hub / github.com/Effect-TS/effect / removeWorktree

Method removeWorktree

packages/tools/api-diff/src/Worktrees.ts:133–141  ·  view source on GitHub ↗
(repoRoot: string, worktree: string)

Source from the content-addressed store, hash-verified

131 })
132
133 const removeWorktree = (repoRoot: string, worktree: string): Effect.Effect<void> =>
134 runCommand("git", ["worktree", "remove", "--force", worktree], repoRoot).pipe(
135 Effect.flatMap((result) =>
136 result.exitCode === ChildProcessSpawner.ExitCode(0)
137 ? Effect.void
138 : Console.error(result.output)
139 ),
140 Effect.catch((error) => Console.error(error.message))
141 )
142
143 const resolveRef = Effect.fnUntraced(function*(repoRoot: string, ref: string) {
144 return yield* runChecked("git", ["rev-parse", "--verify", `${ref}^{commit}`], repoRoot)

Callers

nothing calls this directly

Calls 2

errorMethod · 0.80
pipeMethod · 0.65

Tested by

no test coverage detected