diff options
author | Brandon Casey <casey@nrlssc.navy.mil> | 2008-09-19 00:42:48 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-09-19 05:06:23 +0200 |
commit | a013585b20ac757b0e75a72181ffa44674f35235 (patch) | |
tree | da9c9346c25c6d68650c5db5d39327129e21b50f /xdiff-interface.c | |
parent | diff.c: return pattern entry pointer rather than just the hunk header pattern (diff) | |
download | git-a013585b20ac757b0e75a72181ffa44674f35235.tar.xz git-a013585b20ac757b0e75a72181ffa44674f35235.zip |
diff.c: associate a flag with each pattern and use it for compiling regex
This is in preparation for allowing extended regular expression patterns.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'xdiff-interface.c')
-rw-r--r-- | xdiff-interface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xdiff-interface.c b/xdiff-interface.c index 61dc5c5470..2c81f40cb6 100644 --- a/xdiff-interface.c +++ b/xdiff-interface.c @@ -206,7 +206,7 @@ static long ff_regexp(const char *line, long len, return result; } -void xdiff_set_find_func(xdemitconf_t *xecfg, const char *value) +void xdiff_set_find_func(xdemitconf_t *xecfg, const char *value, int cflags) { int i; struct ff_regs *regs; @@ -231,7 +231,7 @@ void xdiff_set_find_func(xdemitconf_t *xecfg, const char *value) expression = buffer = xstrndup(value, ep - value); else expression = value; - if (regcomp(®->re, expression, 0)) + if (regcomp(®->re, expression, cflags)) die("Invalid regexp to look for hunk header: %s", expression); free(buffer); value = ep + 1; |