(
repo_path: &Path,
worktree_path: &str,
force: bool,
)
| 172 | } |
| 173 | |
| 174 | pub fn remove_worktree( |
| 175 | repo_path: &Path, |
| 176 | worktree_path: &str, |
| 177 | force: bool, |
| 178 | ) -> Result<(), WorktreeError> { |
| 179 | if !is_git_repo(repo_path) { |
| 180 | return Err(WorktreeError::NotGitRepo); |
| 181 | } |
| 182 | |
| 183 | let mut args = vec!["worktree", "remove", worktree_path]; |
| 184 | if force { |
| 185 | args.push("--force"); |
| 186 | } |
| 187 | |
| 188 | run_git(&args, repo_path)?; |
| 189 | Ok(()) |
| 190 | } |
| 191 | |
| 192 | pub fn prune_worktrees(repo_path: &Path) -> Result<(), WorktreeError> { |
| 193 | if !is_git_repo(repo_path) { |
nothing calls this directly
no test coverage detected