diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-10-11 14:24:47 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-10-11 14:24:47 +0900 |
commit | a73f91774cbfb6f31bca328ebf200498fe92d97a (patch) | |
tree | d76ed7e7108565f006967418f33e3d667135ca34 /revision.c | |
parent | Merge branch 'pw/rebase-i-show-HEAD-to-reword' (diff) | |
parent | grep: under --debug, show whether PCRE JIT is enabled (diff) | |
download | tgif-a73f91774cbfb6f31bca328ebf200498fe92d97a.tar.xz |
Merge branch 'ab/pcre-jit-fixes'
A few simplification and bugfixes to PCRE interface.
* ab/pcre-jit-fixes:
grep: under --debug, show whether PCRE JIT is enabled
grep: do not enter PCRE2_UTF mode on fixed matching
grep: stess test PCRE v2 on invalid UTF-8 data
grep: create a "is_fixed" member in "grep_pat"
grep: consistently use "p->fixed" in compile_regexp()
grep: stop using a custom JIT stack with PCRE v1
grep: stop "using" a custom JIT stack with PCRE v2
grep: remove overly paranoid BUG(...) code
grep: use PCRE v2 for optimized fixed-string search
grep: remove the kwset optimization
grep: drop support for \0 in --fixed-strings <pattern>
grep: make the behavior for NUL-byte in patterns sane
grep tests: move binary pattern tests into their own file
grep tests: move "grep binary" alongside the rest
grep: inline the return value of a function call used only once
t4210: skip more command-line encoding tests on MinGW
grep: don't use PCRE2?_UTF8 with "log --encoding=<non-utf8>"
log tests: test regex backends in "--encode=<enc>" tests
Diffstat (limited to 'revision.c')
-rw-r--r-- | revision.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/revision.c b/revision.c index 442a705ad0..0fc0b425f6 100644 --- a/revision.c +++ b/revision.c @@ -28,6 +28,7 @@ #include "commit-graph.h" #include "prio-queue.h" #include "hashmap.h" +#include "utf8.h" volatile show_early_output_fn_t show_early_output; @@ -2687,6 +2688,8 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s grep_commit_pattern_type(GREP_PATTERN_TYPE_UNSPECIFIED, &revs->grep_filter); + if (!is_encoding_utf8(get_log_output_encoding())) + revs->grep_filter.ignore_locale = 1; compile_grep_patterns(&revs->grep_filter); if (revs->reverse && revs->reflog_info) |