MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / resolve_remote_name

Method resolve_remote_name

atomic-cli/src/commands/pull/command.rs:252–260  ·  view source on GitHub ↗

Use the explicit remote first, then the repository default.

(&self, repo: &Repository)

Source from the content-addressed store, hash-verified

250
251 /// Use the explicit remote first, then the repository default.
252 fn resolve_remote_name(&self, repo: &Repository) -> String {
253 match &self.remote {
254 Some(name) => name.clone(),
255 None => repo
256 .get_default_remote()
257 .map(|(name, _entry)| name)
258 .unwrap_or_else(|_| DEFAULT_REMOTE.to_string()),
259 }
260 }
261
262 /// Resolve the remote and optional identity override.
263 fn resolve_remote_url(&self, repo: &Repository) -> CliResult<(String, String, Option<String>)> {

Callers 1

resolve_remote_urlMethod · 0.45

Calls 2

get_default_remoteMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected