Thread (18 messages) 18 messages, 4 authors, 2023-02-07

Re: grep: fix multibyte regex handling under macOS (1819ad327b7a1f19540a819813b70a0e8a7f798f)

flat view

From: Jeff King <hidden>
Date: 2023-02-07 18:24:48

On Sun, Feb 05, 2023 at 02:51:05PM -0500, D. Ben Knoble wrote:
Any thoughts on some sort of stop-gap measure to fix --word-diff while
Git decides how to handle the regex engine incompatibilities? How
important is the sequence of bytes at the end of --word-diff regexes
in userdiff.c?
It comes from 664d44ee7f (userdiff: simplify word-diff safeguard,
2011-01-11). So presumably we'd want to figure out a way to accomplish
the same thing in a portable way. I'm not sure that's possible, though,
without making assumptions about the regex engine.

There's a little more discussion in the original thread:

  https://lore.kernel.org/git/561247.22837.qm@web110707.mail.gq1.yahoo.com/ (local)

but I didn't read it very carefully.

It may also be possible to play tricks with LC_CTYPE (either not setting
it, or resetting before/after a regex), but that feels pretty hacky.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help