nd/icase updates
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v7 Latest12 patches 0 repliesNew
- v611 patches 13 repliesSuperseded
- v510 patches 7 repliesSuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v4 | 10 patches | 0 replies | Superseded | |
| v3 | 9 patches | 3 replies | Superseded | |
| v2 | 9 patches | 7 replies | Superseded |
Patches in v7 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/12 | grep: allow -F -i combinationbuiltin/ | +1 | 0 replies | |
| 2/12 | grep: break down an "if" stmt in preparation for next changesgrep.c | +3 | 0 replies | |
| 3/12 | test-regex: isolate the bug test codet/ test-regex.c | +11 | 0 replies | |
| 4/12 | test-regex: expose full regcomp() to the command linetest-regex.c | +49 | 0 replies | |
| 5/12 | grep/icase: avoid kwsset on literal non-ascii stringsgrep.c t/ | +29 | 0 replies | |
| 6/12 | grep/icase: avoid kwsset when -F is specifiedgrep.c quote.c quote.h +1 more | +88 | 0 replies | |
| 7/12 | grep/pcre: prepare locale-dependent tables for icase matchinggrep.c grep.h t/ | +26 | 0 replies | |
| 8/12 | gettext: add is_utf8_locale()gettext.c gettext.h | +23 | 0 replies | |
| 9/12 | grep/pcre: support utf-8grep.c t/ | +17 | 0 replies | |
| 10/12 | diffcore-pickaxe: "share" regex error handling codediffcore-pickaxe.c | +8 | 0 replies | |
| 11/12 | diffcore-pickaxe: support case insensitive match on non-asciidiffcore-pickaxe.c t/ | +18 | 0 replies | |
| 12/12 | grep.c: reuse "icase" variablegrep.c | +1 | 0 replies |
Reviews trailers per patch
None of the 12 patches has a Reviewed-by or Acked-by.
| Patch | Plamen Totev | Eric Sunshine | Ramsay Jones | René Scharfe | Ævar Arnfjörð Bjarmason |
|---|---|---|---|---|---|
| 1/12 | |||||
| 2/12 | |||||
| 3/12 | Helped-by | Helped-by | |||
| 4/12 | |||||
| 5/12 | Noticed-by | Helped-by | Helped-by | ||
| 6/12 | Noticed-by | Helped-by | Helped-by | ||
| 7/12 | |||||
| 8/12 | Helped-by | ||||
| 9/12 | Noticed-by Helped-by | ||||
| 10/12 | |||||
| 11/12 | Noticed-by | ||||
| 12/12 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.
Cover letter [PATCH v7 00/12] nd/icase updates
v7 addresses two comments from Junio and Eric in v6 and adds an extra patch, 12/12, which reuses "icase" variable and avoids recalculating the same thing (which can't be done before v6). Interdiff
grep.c +6 -8
@@ -432,22 +432,20 @@ static void compile_regexp(struct grep_pat *p, struct grep_opt *opt) icase = opt->regflags ®_ICASE || p->ignore_case; ascii_only = !has_non_ascii (p->pattern); -if ((!icase || ascii_only) &&is_fixed (p->pattern, p->patternlen)) - p->fixed =1 ; -else if (opt->fixed) { +if (opt->fixed) { p->fixed = !icase || ascii_only;if (!p->fixed) {compile_fixed_regexp (p, opt);return ; } - }else + }else if ((!icase || ascii_only) && +is_fixed (p->pattern, p->patternlen)) + p->fixed =1 ; +else p->fixed =0 ;if (p->fixed) { -if (opt->regflags ®_ICASE || p->ignore_case) - p->kws =kwsalloc (tolower_trans_tbl); -else - p->kws =kwsalloc (NULL ); + p->kws =kwsalloc (icase ? tolower_trans_tbl :NULL );kwsincr (p->kws, p->pattern, p->patternlen);kwsprep (p->kws);return ;
test-regex.c +2 -2
@@ -47,8 +47,8 @@ int main(int argc, char **argv)if (argc ==2 && !strcmp (argv[1 ],"--bug" ))return test_regex_bug ();else if (argc <3 ) -die ("usage: test-regex --bug\n" -" test-regex <pattern> <string> [<options>]" ); +usage ("test-regex --bug\n" +"test-regex <pattern> <string> [<options>]" ); argv++; pat = *argv++;
Nguyễn Thái Ngọc Duy (12):
grep: allow -F -i combination
grep: break down an "if" stmt in preparation for next changes
test-regex: isolate the bug test code
test-regex: expose full regcomp() to the command line grep/icase: avoid kwsset on literal non-ascii strings grep/icase: avoid kwsset when -F is specified grep/pcre: prepare locale-dependent tables for icase matching
gettext: add is_utf8_locale()
grep/pcre: support utf-8
diffcore-pickaxe: "share" regex error handling code
diffcore-pickaxe: support case insensitive match on non-ascii grep.c: reuse "icase" variable
builtin/grep.c | 2 +- diffcore-pickaxe.c | 27 ++++++++---- gettext.c | 24 ++++++++++- gettext.h | 1 + grep.c | 47 +++++++++++++++++---- grep.h | 1 + quote.c | 37 +++++++++++++++++ quote.h | 1 + t/t0070-fundamental.sh | 2 +- t/t7812-grep-icase-non-ascii.sh (new +x) | 71 ++++++++++++++++++++++++++++++++ t/t7813-grep-icase-iso.sh (new +x) | 19 +++++++++ test-regex.c | 59 +++++++++++++++++++++++++- 12 files changed, 270 insertions(+), 21 deletions(-) create mode 100755 t/t7812-grep-icase-non-ascii.sh create mode 100755 t/t7813-grep-icase-iso.sh
Signature · 1 line
2.7.0.377.g4cd97dd