Documentation
¶
Overview ¶
Package refname validates reference names (branch, tag, HEAD) for both storage backends. Centralizing this logic prevents divergence between the filesystem and memory backends.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsWindowsReservedName ¶
IsWindowsReservedName checks if a name is reserved by Windows and cannot be used as a filename. Covers CON, AUX, NUL, PRN, COM0-9, LPT0-9. The check is case-insensitive, matching Windows filesystem behavior.
func RefType ¶
RefType derives the core.RefType from a reference name. "HEAD" maps to RefTypeHead; names prefixed with "heads/" or "tags/" map to RefTypeBranch or RefTypeTag respectively; anything else defaults to RefTypeBranch. This logic is shared by the filesystem and memory backends so both return the same Type for the same name without duplicating the dispatch.
Types ¶
This section is empty.