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

Function resolve_identity_name

atomic-cli/src/commands/auth.rs:397–399  ·  view source on GitHub ↗

Extract the identity name from a remote URL alone (no server config). Tries URL userinfo first (`bob@host`), then the subdomain (`bob.host`). This is the config-free path; [`resolve_identity_name_with_override`] layers the `--identity` override and configured server bindings on top.

(remote_url: &str)

Source from the content-addressed store, hash-verified

395/// This is the config-free path; [`resolve_identity_name_with_override`] layers
396/// the `--identity` override and configured server bindings on top.
397fn resolve_identity_name(remote_url: &str) -> Option<String> {
398 resolve_identity_from_url(remote_url, &[])
399}
400
401/// Extract the first subdomain label from a host string.
402///

Callers 5

userinfo_takes_priorityFunction · 0.85
subdomain_fallbackFunction · 0.85
full_domain_subdomainFunction · 0.85
invalid_url_returns_noneFunction · 0.85

Calls 1

Tested by 5

userinfo_takes_priorityFunction · 0.68
subdomain_fallbackFunction · 0.68
full_domain_subdomainFunction · 0.68
invalid_url_returns_noneFunction · 0.68