{
int component_len, component_count = 0;
- if (!strcmp(refname, "@"))
- /* Refname is a single character '@'. */
- return -1;
-
while (1) {
/* We are at the start of a path component. */
component_len = check_refname_component(refname, flags);
return 0;
}
-struct ref *find_ref_by_name(const struct ref *list, const char *name)
-{
- for ( ; list; list = list->next)
- if (!strcmp(list->name, name))
- return (struct ref *)list;
- return NULL;
-}
-
/*
* generate a format suitable for scanf from a ref_rev_parse_rules
* rule, that is replace the "%.*s" spec with a "%s" spec