git-check-ref-format
检查引用名称格式是否合法,不合法时返回非零状态码。 更多信息:https://git-scm.com/docs/git-check-ref-format.
git check-ref-format {{refs/head/refname}}
git check-ref-format --branch @{-1}
git check-ref-format --normalize {{refs/head/refname}}