/* * GIT - The information manager from hell */ #include "builtin.h" #include "refs.h" #include "setup.h" #include "strbuf.h" static const char builtin_check_ref_format_usage[] = …; /* * Return a copy of refname but with leading slashes removed and runs * of adjacent slashes replaced with single slashes. * * This function is similar to normalize_path_copy(), but stripped down * to meet check_ref_format's simpler needs. */ static char *collapse_slashes(const char *refname) { … } static int check_ref_format_branch(const char *arg) { … } int cmd_check_ref_format(int argc, const char **argv, const char *prefix, struct repository *repo UNUSED) { … }