Remove a worktree.
(repo_path: &Path, worktree_path: &Path)
| 109 | |
| 110 | /// Remove a worktree. |
| 111 | pub async fn remove_worktree(repo_path: &Path, worktree_path: &Path) -> Result<()> { |
| 112 | run_git( |
| 113 | repo_path, |
| 114 | &[ |
| 115 | "worktree", |
| 116 | "remove", |
| 117 | "--force", |
| 118 | &worktree_path.to_string_lossy(), |
| 119 | ], |
| 120 | ) |
| 121 | .await?; |
| 122 | Ok(()) |
| 123 | } |
| 124 | |
| 125 | /// Get the current HEAD SHA. |
| 126 | pub async fn get_current_sha(worktree_path: &Path) -> Result<String> { |