pub fn validate_git_ref(s: &str) -> Result<&str, String>
Validate a user-supplied git ref before passing it to git.