Skip to main content

parse_source

Function parse_source 

Source
pub fn parse_source(raw: &str) -> Result<DigestSource, String>
Expand description

Parse and validate the source argument.

  • https:// URLs are accepted for any host.
  • ssh://, git://, http://, and scp-like user@host:path shorthand are rejected outright — no interactive auth in the daemon (ADR-088 Amendment 1, security posture).
  • Anything else is treated as a local path: it must be absolute and must contain a .git entry; arbitrary directory walking is not performed.