aboutsummaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-03-23 09:54:42 -0700
committerJunio C Hamano <gitster@pobox.com>2026-03-25 15:04:30 -0700
commitbd66ed316c868aacdb6b5e3a21751c5bab3a4f31 (patch)
tree435cba6140c9b356d60bb5b56a644aa4b8b7c3a3 /compat
parent41688c1a2312f62f44435e1a6d03b4b904b5b0ec (diff)
downloadgit-bd66ed316c868aacdb6b5e3a21751c5bab3a4f31.tar.xz
regexp: leave a pointer to resurrect workaround for Homebrew
Recently some GitHub CI jobs were broken by update on the platform side, which was eventually resolved by image rollback, but in the meantime Dscho invented a workaround patch to sidestep the broken part of the platform. Their future image update may contain the same bug, in which case the workaround may again become needed. As we do not want to be building with workaround that avoids system regexp library altogether unless the system is known to be broken, so short of an automated "detect broken system and apply workaround" mechanism, let's use the folks who are compiling the code to detect breakage on their system and cope with the breakage ;-) Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat')
-rw-r--r--compat/regcomp_enhanced.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/compat/regcomp_enhanced.c b/compat/regcomp_enhanced.c
index 84193ce53b..29c74eee99 100644
--- a/compat/regcomp_enhanced.c
+++ b/compat/regcomp_enhanced.c
@@ -3,6 +3,11 @@
int git_regcomp(regex_t *preg, const char *pattern, int cflags)
{
+ /*
+ * If you are on macOS with clang and fail to compile this line,
+ * https://lore.kernel.org/git/458ad3c1-96df-4575-ee42-e6eb754f25f6@gmx.de/
+ * might be relevant.
+ */
if (!(cflags & REG_EXTENDED))
cflags |= REG_ENHANCED;
return regcomp(preg, pattern, cflags);