Trims surrounding whitespace. Rejects a blank name, a control character, a leading or trailing /, an empty segment (a//b), and a . or .. segment. Git rejects all of those as ref names too, so nothing valid is lost.
Attributes
Returns
the trimmed name, or a ValidationError on the "branch" field