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

Method resolve_remote_name

atomic-cli/src/commands/push/command.rs:295–303  ·  view source on GitHub ↗

Use the explicit remote first, then the repository default.

(&self, repo: &Repository)

Source from the content-addressed store, hash-verified

293
294 /// Use the explicit remote first, then the repository default.
295 fn resolve_remote_name(&self, repo: &Repository) -> String {
296 match &self.remote {
297 Some(name) => name.clone(),
298 None => repo
299 .get_default_remote()
300 .map(|(name, _entry)| name)
301 .unwrap_or_else(|_| DEFAULT_REMOTE.to_string()),
302 }
303 }
304
305 /// Builder: set the dry-run flag.
306 pub fn with_dry_run(mut self, dry_run: bool) -> Self {

Callers 1

resolve_remote_urlMethod · 0.45

Calls 2

get_default_remoteMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected