Skip to main content

valid_ref

Function valid_ref 

Source
pub fn valid_ref(s: &str) -> bool
Expand description

JSS okRef: alphanumeric first, then [A-Za-z0-9._/-] (at most 201), no .., no //, no trailing /. Additionally refuses a trailing .lock or ., which git itself would reject, so a branch name can never address a lock file. A leading - is impossible, so it can never be read as an option.