remove duplicate code in the comprehensive variant of the worktree cleanup implementation (#672)

This commit is contained in:
Britannio Jarrett
2025-09-10 14:31:06 +00:00
committed by GitHub
parent 89beac2dae
commit 93994eef59

View File

@@ -200,12 +200,6 @@ impl WorktreeManager {
let git_repo_path = Self::get_git_repo_path(repo)?;
// Try git CLI worktree remove first (force). This tends to be more robust.
let git = GitCli::new();
if let Err(e) = git.worktree_remove(&git_repo_path, worktree_path, true) {
debug!("git worktree remove non-fatal error: {}", e);
}
// Step 1: Use Git CLI to remove the worktree registration (force) if present
// The Git CLI is more robust than libgit2 for mutable worktree operations
let git = GitCli::new();