]> git.ipfire.org Git - thirdparty/git.git/blobdiff - grep.c
test-ref-store: remove force-create argument for create-reflog
[thirdparty/git.git] / grep.c
diff --git a/grep.c b/grep.c
index f6e113e9f0fd52bc40c08613919eade24020d8da..fe847a0111a209279656c5a14318d2fa196df2ed 100644 (file)
--- a/grep.c
+++ b/grep.c
@@ -382,10 +382,8 @@ static void compile_pcre2_pattern(struct grep_pat *p, const struct grep_opt *opt
                }
                options |= PCRE2_CASELESS;
        }
-       if ((!opt->ignore_locale && !has_non_ascii(p->pattern)) ||
-           (!opt->ignore_locale && is_utf8_locale() &&
-            has_non_ascii(p->pattern) && !(!opt->ignore_case &&
-                                           (p->fixed || p->is_fixed))))
+       if (!opt->ignore_locale && is_utf8_locale() && has_non_ascii(p->pattern) &&
+           !(!opt->ignore_case && (p->fixed || p->is_fixed)))
                options |= (PCRE2_UTF | PCRE2_MATCH_INVALID_UTF);
 
 #ifdef GIT_PCRE2_VERSION_10_36_OR_HIGHER