(repo_path: &Path, remote_name: &str)
| 231 | } |
| 232 | |
| 233 | pub async fn remove_remote(repo_path: &Path, remote_name: &str) -> Result<(), String> { |
| 234 | tokio::task::spawn_blocking({ |
| 235 | let repo_path = repo_path.to_owned(); |
| 236 | let remote_name = remote_name.to_owned(); |
| 237 | move || -> Result<(), String> { |
| 238 | let repo = Repository::open(&repo_path) |
| 239 | .map_err(|e| format!("Failed to open repository: {e}"))?; |
| 240 | |
| 241 | repo.remote_delete(&remote_name) |
| 242 | .map_err(|e| format!("Failed to remove temporary remote: {e}"))?; |
| 243 | |
| 244 | Ok(()) |
| 245 | } |
| 246 | }) |
| 247 | .await |
| 248 | .map_err(|e| format!("Task join error: {e}"))? |
| 249 | } |
| 250 | |
| 251 | /// Check if a branch has commits that are not in the base branch |
| 252 | pub async fn has_commits_not_in_base( |
no outgoing calls