pub fn validate_branch_name(name: &str) -> Result<()>
Validate a branch name: non-empty, no path separators, whitespace, or leading dash, and not a dotted special name.