pub fn validate_git_ref(s: &str) -> Result<&str, String>Expand description
Validate a user-supplied git ref before it reaches a git subprocess:
rejects empty refs, option-like refs starting with -, and characters
outside the ref-syntax allowlist.
ยงErrors
Returns a message describing why the ref was rejected.