Re: [PATCH v2 00/12] nd/icase updates
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 1, 2016, 18:54 UTC
- Message-ID
- <xmqqziq1xk8j.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CACsJy8BBQqxzT8jdaysyeDv3ja=DTD6R-whA3Lhr3pEs-2x8dA@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
Show 13 quoted lines
> On Fri, Jul 1, 2016 at 8:18 PM, Junio C Hamano <gitster@pobox.com> wrote: >> Duy Nguyen <pclouds@gmail.com> writes: >> >>> Makes sense. But then if opt->ignore_case is false and regflags >>> happens to have REG_ICASE set, should we clear it as well? >> >> I think .ignore_case is set iff '-i' is given, and .regflags has >> REG_ICASE only if '-i' is given and the user said she does not want >> literal string match (i.e. no '-F'). >> >> So... can .regflags have REG_ICASE when .ignore_case is false? > > Yeah reg_icase is more like a subset of ignore_case. Ignore what I wrote.
The rule of the game can be updated to make whoever looks at .ignore_case currently instead look at .regflags & REG_ICASE; that way, we could remove .ignore_case and stop worrying about one is subset of the other.
It is just it felt funny to be mucking with .regflags when the user explicitly said -F, and that is why they are separate.