pub fn valid_ref(s: &str) -> boolExpand 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.