Skip to main content

validate_ref_name

Function validate_ref_name 

Source
pub fn validate_ref_name(
    field: &'static str,
    value: &str,
) -> Result<(), GitArgError>
Expand description

Validates a branch/ref-shaped identifier: name (git.branch), from (git.branch’s optional start point), and branch (git.push’s target ref). Deliberately more restrictive than git’s own check-ref-format – this only needs to admit the identifiers a legitimate caller would ever pass, not the full ref grammar.