MCPcopy Create free account
hub / github.com/AI45Lab/Code / remote

Method remote

core/src/tools/builtin/git.rs:382–396  ·  view source on GitHub ↗

Show remote information.

(&self, git: &dyn WorkspaceGit)

Source from the content-addressed store, hash-verified

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(

Callers 1

executeMethod · 0.80

Calls 2

list_remotesMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected