Show remote information.
(&self, git: &dyn WorkspaceGit)
| 380 | |
| 381 | /// Show remote information. |
| 382 | async fn remote(&self, git: &dyn WorkspaceGit) -> Result<ToolOutput> { |
| 383 | match git.list_remotes().await { |
| 384 | Ok(remotes) if remotes.is_empty() => { |
| 385 | Ok(ToolOutput::success("No remotes configured.".to_string())) |
| 386 | } |
| 387 | Ok(remotes) => { |
| 388 | let entries: Vec<String> = remotes.iter().map(format_remote).collect(); |
| 389 | Ok(ToolOutput::success(format!( |
| 390 | "Remotes:\n{}", |
| 391 | entries.join("\n") |
| 392 | ))) |
| 393 | } |
| 394 | Err(e) => Ok(ToolOutput::error(format!("Failed to list remotes: {e}"))), |
| 395 | } |
| 396 | } |
| 397 | |
| 398 | /// Worktree operations. |
| 399 | async fn worktree( |
no test coverage detected