Raw
1 #include "../git-compat-util.h"
2 #undef regcomp
3
4 int git_regcomp(regex_t *preg, const char *pattern, int cflags)
5 {
6 /*
7 * If you are on macOS with clang and fail to compile this line,
8 * https://lore.kernel.org/git/458ad3c1-96df-4575-ee42-e6eb754f25f6@gmx.de/
9 * might be relevant.
10 */
11 if (!(cflags & REG_EXTENDED))
12 cflags |= REG_ENHANCED;
13 return regcomp(preg, pattern, cflags);
14 }