pub fn validate_ref_name(name: &str) -> boolExpand description
Validate a ref name per SPEC-REFS §3. Used at every transport boundary; transports MUST NOT silently lower-case or canonicalise.
Grammar:
- Non-empty.
- Segments split on
/, each segment matches[A-Za-z0-9._-]+. - No
.or..segments. No empty segments (no//, no leading/, no trailing/). - No
\\or NUL bytes. - No segment may end in
.lock(the canonical lock-file suffix). - The final segment may not be the literal
HEAD, since that would shadow the repo-levelHEADpointer.