is_valid_name


Description:

public static bool is_valid_name (string name)

Check if the given name is a valid name for a reference.

Note that name should be the full ref name (including prefixes).

Valid toplevel names can contain only capital letters and underscores and must start and end with a letter (e.g. HEAD, ORIG_HEAD).

Valid refs/ names may contain any characters, except '~', '^', ':', '\', '?', '[', '*', ".." and "@{", because they are interpreted by revparse.

Parameters:

name

the name to validate.

Returns:

true if name is valid, false otherwise.