mirror of
https://github.com/git-for-windows/git.git
synced 2025-12-13 08:41:13 -06:00
grep.c: reuse "icase" variable
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
b51a9c1479
commit
695f95ba5d
5
grep.c
5
grep.c
@ -454,10 +454,7 @@ static void compile_regexp(struct grep_pat *p, struct grep_opt *opt)
|
|||||||
p->fixed = 0;
|
p->fixed = 0;
|
||||||
|
|
||||||
if (p->fixed) {
|
if (p->fixed) {
|
||||||
if (opt->regflags & REG_ICASE || p->ignore_case)
|
p->kws = kwsalloc(icase ? tolower_trans_tbl : NULL);
|
||||||
p->kws = kwsalloc(tolower_trans_tbl);
|
|
||||||
else
|
|
||||||
p->kws = kwsalloc(NULL);
|
|
||||||
kwsincr(p->kws, p->pattern, p->patternlen);
|
kwsincr(p->kws, p->pattern, p->patternlen);
|
||||||
kwsprep(p->kws);
|
kwsprep(p->kws);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user