(&self, args: Vec<String>)
| 546 | } |
| 547 | |
| 548 | async fn run_git_command(&self, args: Vec<String>) -> Result<(bool, String, String)> { |
| 549 | tokio::task::spawn_blocking(crate::git::ensure_git_installed) |
| 550 | .await |
| 551 | .map_err(|e| anyhow!("Git worker failed: {}", e))??; |
| 552 | |
| 553 | let output = tokio::process::Command::new("git") |
| 554 | .arg("-C") |
| 555 | .arg(self.root.as_os_str()) |
| 556 | .args(&args) |
| 557 | .output() |
| 558 | .await |
| 559 | .map_err(|e| anyhow!("Failed to execute git: {}", e))?; |
| 560 | |
| 561 | Ok(( |
| 562 | output.status.success(), |
| 563 | String::from_utf8_lossy(&output.stdout).to_string(), |
| 564 | String::from_utf8_lossy(&output.stderr).to_string(), |
| 565 | )) |
| 566 | } |
| 567 | } |
| 568 | |
| 569 | fn parse_git_remote_line(line: &str) -> Option<WorkspaceGitRemote> { |
no test coverage detected