author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | |
Sat, 22 May 2010 21:35:07 +0000 (23:35 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 24 May 2010 18:22:07 +0000 (11:22 -0700) | ||
commit | f96e56733ab3e3ce5c79c27c673c746af1519a86 | |
tree | 42f6ba5116cb3c3f16165617a54c1b35438a8d5e | tree | snapshot |
parent | 52d799a79f921cc47823a0455b0e646636410b65 | commit | diff |
grep: use REG_STARTEND for all matching if available
Refactor REG_STARTEND handling inlook_ahead() into a new helper,
regmatch(), and use it for line matching, too. This allows regex
matching beyond NUL characters if regexec() supports the flag. NUL
characters themselves are not matched in any way, though.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Refactor REG_STARTEND handling inlook_ahead() into a new helper,
regmatch(), and use it for line matching, too. This allows regex
matching beyond NUL characters if regexec() supports the flag. NUL
characters themselves are not matched in any way, though.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
grep.c | diff | blob | history | |
t/t7008-grep-binary.sh | diff | blob | history |