Code

git config: don't allow multiple variable types
[git.git] / grep.c
diff --git a/grep.c b/grep.c
index 6485760ff30e0575ee13b43fc8c7fb8e2e291346..062b2b6f28f6332518240d2a474a7739735e1ecf 100644 (file)
--- a/grep.c
+++ b/grep.c
@@ -28,15 +28,9 @@ void append_grep_pattern(struct grep_opt *opt, const char *pat,
        p->next = NULL;
 }
 
-static int isregexspecial(int c)
-{
-       return isspecial(c) || c == '$' || c == '(' || c == ')' || c == '+' ||
-                              c == '.' || c == '^' || c == '{' || c == '|';
-}
-
 static int is_fixed(const char *s)
 {
-       while (!isregexspecial(*s))
+       while (*s && !is_regex_special(*s))
                s++;
        return !*s;
 }