]> git.ipfire.org Git - thirdparty/git.git/commit - grep.c
grep: add pmatch and eflags arguments to match_one_pattern()
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>
Sat, 7 Mar 2009 12:30:27 +0000 (13:30 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 7 Mar 2009 19:34:57 +0000 (11:34 -0800)
commit79212772ce127cc32a67d50eaaa7f1c102ce7d5d
tree076afff7009a549e52ada28fff24b2c4776b820e
parentd7eb527d731e2a71eaa4597417d879a15588d9ee
grep: add pmatch and eflags arguments to match_one_pattern()

Push pmatch and eflags to the callers of match_one_pattern(), which
allows them to specify regex execution flags and to get the location
of a match.

Since we only use the first element of the matches array and aren't
interested in submatches, no provision is made for callers to
provide a larger array.

eflags are ignored for fixed patterns, but that's OK, since they
only have a meaning in connection with regular expressions
containing ^ or $.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
grep.c