Skip to main content

parse_ref

Function parse_ref 

Source
pub fn parse_ref(raw: &str, default_refs_tags_prefix: bool) -> ParsedRef
Expand description

Normalise raw into a ParsedRef for semver comparison.

Strips refs/tags/ and then any non-digit scheme prefix that precedes the first digit, so v, hl, release-, and nix-darwin- are all reduced to their numeric core in one pass. The remainder is fed through [normalize_semver], which pads short forms like 1.0 out to three segments.