Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/refs.c b/refs.c
index 503a8c2bd0..5a860c41eb 100644
--- a/refs.c
+++ b/refs.c
@@ -695,7 +695,6 @@ int for_each_glob_ref_in(each_ref_fn fn, const char *pattern,
{
struct strbuf real_pattern = STRBUF_INIT;
struct ref_filter filter;
- const char *has_glob_specials;
int ret;
if (!prefix && prefixcmp(pattern, "refs/"))
@@ -704,9 +703,8 @@ int for_each_glob_ref_in(each_ref_fn fn, const char *pattern,
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. */