Subject: Re: [PATCH v3 05/30] log: make --regexp-ignore-case work with --perl-regexp

From: Junio C Hamano <[email-masked]>
Date: Mon, 22 May 2017 09:17:50 +0900

Ævar Arnfjörð Bjarmason <[email-masked]> writes:

>> Looks good.
>>
>> I however wonder if it is a better approach in the longer term to
>> treat the .ignore_case field just like .extended_regexp_option
>> field, i.e. not committing immediately to .regflags but commit it
>> after config and command line parsing is done, just like we make the
>> "BRE? ERE?" decision in grep_commit_pattern_type().
>
> I started hacking up a patch to fix the root cause of this, i.e. the
> users of the grep API should only set `.ignore_case = 1` and not care
> about setting regflags, but it was more than a trivial change, so I
> didn't include it in this series:

Ah, sorry.  Now I re-read my response, "Looks good.  I however
wonder..." does sound like I am requesting to do something more to
solve the same issue.  I shouldn't have phrased it that way.  It was
more like "while I was staring the context lines of your patch, I
noticed this tangent", nothing more.

> ...
> But an even better solution is to get rid of passing the regflags
> field in grep_opt entirely, this conflicts with some of my later
> patches:

Yes, that may be a good direction to go in longer term, but let's
not push it before the other bits already in flight land safely.

> ...
> But as all this code cleanup isn't needed for fixing this bug, and I'd
> really like to get this series merged into next/master ASAP so I can
> start submitting the grep/pcre patches that are actually interesting,
> let's leave this orthogonal code cleanup for now.

Yes.  Thanks.