Re: [PATCH v4 05/10] userdiff: add and use for_each_userdiff_driver()
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Apr 9, 2021, 19:44 UTC
- Message-ID
- <87czv3gs3q.fsf@evledraar.gmail.com>
- In-Reply-To
- <YF1UuNBrAWvHSCp1@coredump.intra.peff.net>
On Fri, Mar 26 2021, Jeff King wrote:
Show 23 quoted lines
> On Thu, Mar 25, 2021 at 02:26:21AM +0100, Ævar Arnfjörð Bjarmason wrote: > >> >> We could add a ifuncname and xifuncname or whatever for it I guess, >> >> but currently the ICASE behavior in the C code is magic. >> > >> > Good point. IMHO that is something we should consider fixing >> > independently. It was a mistake to add builtins that couldn't be >> > replicated via the config (though I notice it happened quite a while >> > ago, and nobody seems to have cared, so perhaps it isn't that >> > important). >> >> I'm conspiring to eventually optimistically replace these ERE patterns >> with PCRE if we build with that at some point. >> >> Then you could just prefix your pattern with (?i) here in this and other >> things that want icase... > > I really like PCRE myself, but is it portable/common enough for us to > start using it for baked-in funcname patterns? I sort of assumed there > were exotic platforms where libpcre wouldn't build (or at least it would > be inconvenient or uncommon to have it). And it would be nice to degrade > those gracefully (or at least better than "I guess you don't get any > builtin funcnames. Tough luck").
I think it's as portable as git, the JIT backend isn't, but PCRE itself is portably C code, and e.g. everything that python, PHP and any other number of things that depend on PCRE has had PCRE ported to it.
That plan involves an "git rm -r compat/regex" and a compat/pcre instead, I have some long-left-over patches for that.