Skip to main content

ssh_url_for_source_id

Function ssh_url_for_source_id 

Source
pub(super) fn ssh_url_for_source_id(url: Url) -> String
Expand description

Serializes an SSH URL as a WHATWG URL for SourceId and cache identity.

gix preserves relative SCP paths because host:repo and ssh://host/repo fetch different repositories. SourceId cannot represent SCP syntax, so make the path absolute here and retain the original URL for fetching. Tilde paths already have a lossless ssh:// form and need no adjustment.