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:
committed by
Junio C Hamano
parent
321ffcc055
commit
1baddf4b37
@ -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
|
||||
|
||||
Reference in New Issue
Block a user