MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / prune_worktrees

Function prune_worktrees

crates/opencode-server/src/worktree.rs:192–199  ·  view source on GitHub ↗
(repo_path: &Path)

Source from the content-addressed store, hash-verified

190}
191
192pub fn prune_worktrees(repo_path: &Path) -> Result<(), WorktreeError> {
193 if !is_git_repo(repo_path) {
194 return Err(WorktreeError::NotGitRepo);
195 }
196
197 run_git(&["worktree", "prune"], repo_path)?;
198 Ok(())
199}

Callers 1

reset_worktreeFunction · 0.85

Calls 2

is_git_repoFunction · 0.85
run_gitFunction · 0.85

Tested by

no test coverage detected