summaryrefslogtreecommitdiff
path: root/xdiff-interface.c
diff options
context:
space:
mode:
authorBrandon Casey <casey@nrlssc.navy.mil>2008-09-18 17:42:48 -0500
committerJunio C Hamano <gitster@pobox.com>2008-09-18 20:06:23 -0700
commita013585b20ac757b0e75a72181ffa44674f35235 (patch)
treeda9c9346c25c6d68650c5db5d39327129e21b50f /xdiff-interface.c
parent45e7ca0f0e1042c26d56b578165365c3f70c0121 (diff)
downloadgit-a013585b20ac757b0e75a72181ffa44674f35235.tar.gz
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.c4
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(&reg->re, expression, 0))
+ if (regcomp(&reg->re, expression, cflags))
die("Invalid regexp to look for hunk header: %s", expression);
free(buffer);
value = ep + 1;