Skip to main content

try_get_origin_identity

Function try_get_origin_identity 

Source
pub fn try_get_origin_identity(repo_path: &Path) -> Result<Option<RepoIdentity>>
Expand description

Get the canonical identity of a repository’s origin remote, if available.

Returns Ok(Some(identity)) if the repo has an origin and it parses successfully, Ok(None) if the repo has no origin or it can’t be parsed, or an error for other failures (permissions, corruption, etc.).