{
struct strbuf real_pattern = STRBUF_INIT;
struct ref_filter filter;
- const char *has_glob_specials;
int ret;
if (!prefix && prefixcmp(pattern, "refs/"))
strbuf_addstr(&real_pattern, prefix);
strbuf_addstr(&real_pattern, pattern);
- has_glob_specials = strpbrk(pattern, "?*[");
- if (!has_glob_specials) {
- /* Append impiled '/' '*' if not present. */
+ if (!has_glob_specials(pattern)) {
+ /* Append implied '/' '*' if not present. */
if (real_pattern.buf[real_pattern.len - 1] != '/')
strbuf_addch(&real_pattern, '/');
/* No need to check for '*', there is none. */