grep: use memmem() for fixed string search

Allow searching beyond NUL characters by using memmem() instead of
strstr().

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
René Scharfe
2010-05-22 23:32:43 +02:00
committed by Junio C Hamano
parent 321ffcc055
commit 1baddf4b37
2 changed files with 13 additions and 7 deletions

View File

@ -51,4 +51,8 @@ test_expect_success 'git grep -q ina a' '
test_cmp expect actual
'
test_expect_success 'git grep -F ile a' '
git grep -F ile a
'
test_done