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@xxxxxxxxxxxxxxxxxxxxxxxxxxxx/ 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