Skip to main content

parse_ssh_url

Function parse_ssh_url 

Source
pub fn parse_ssh_url(rawurl: &str) -> Option<SshInfo>
Expand description

Extract the SSH metadata from a remote URL — the <user_and_host> and <path> pieces git lfs env echoes back as SSH=<user_and_host>:<path>. Returns None for URLs that don’t look SSH-shaped (HTTP(S), git://, file://, plain paths).

Mirrors upstream’s EndpointFromSshUrl / EndpointFromBareSshUrl for the metadata fields specifically; the URL itself is rewritten elsewhere (see derive_lfs_url).