diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2008-09-29 10:23:19 -0700 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2008-09-29 10:23:19 -0700 |
commit | edb7e82f72106add9f2fbaf9d99d9532a72e3f91 (patch) | |
tree | a4622ea3d53d1414acd3a20eb0098140ff864cd6 /xdiff-interface.c | |
parent | e9a06f1eeb6ddd952ece71eaa87e613d715eade6 (diff) | |
parent | e3bf5e43fd9db9391ebc876ef118dbb431853d69 (diff) | |
download | git-edb7e82f72106add9f2fbaf9d99d9532a72e3f91.tar.gz |
Merge branch 'bc/maint-diff-hunk-header-fix' into maint
* bc/maint-diff-hunk-header-fix:
t4018-diff-funcname: test syntax of builtin xfuncname patterns
diff hunk pattern: fix misconverted "\{" tex macro introducers
diff: use extended regexp to find hunk headers
diff.*.xfuncname which uses "extended" regex's for hunk header selection
diff.c: associate a flag with each pattern and use it for compiling regex
diff.c: return pattern entry pointer rather than just the hunk header pattern
Conflicts:
Documentation/gitattributes.txt
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; |