git_reference_is_valid_name

Ensure the reference name is well-formed.

Valid reference names must follow one of two patterns:

1. Top-level names must contain only capital letters and underscores, and must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD"). 2. Names prefixed with "refs/" can be almost anything. You must avoid the characters '~', '^', ':', '\\', '?', '[', and '*', and the sequences ".." and "@{" which have special meaning to revparse.

extern (C) nothrow @nogc
int
git_reference_is_valid_name
(
const(char)* refname
)

Parameters

refname const(char)*

name to be checked.

Return Value

Type: int

1 if the reference name is acceptable; 0 if it isn't

Meta