author | Michał Kiedrowicz <michal.kiedrowicz@gmail.com> | |
Wed, 4 May 2011 22:00:19 +0000 (00:00 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 5 May 2011 15:38:12 +0000 (08:38 -0700) | ||
commit | 97e777842260a5339bb5272a35ebeaeaae554937 | |
tree | 22961e850ded32de96f2dfe1fd108cef6c82e15d | tree | snapshot |
parent | 5a69eaf5541b8449ede74f148d395abd0acbf20f | commit | diff |
grep: Put calls to fixmatch() and regmatch() into patmatch()
Both match_one_pattern() and look_ahead() use fixmatch() and regmatch()
in the same way. They really want to match a pattern againt a string,
but now they need to know if the pattern is fixed or regexp.
This change cleans this up by introducing patmatch() (from "pattern
match") and also simplifies inserting other ways of matching a string.
Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Both match_one_pattern() and look_ahead() use fixmatch() and regmatch()
in the same way. They really want to match a pattern againt a string,
but now they need to know if the pattern is fixed or regexp.
This change cleans this up by introducing patmatch() (from "pattern
match") and also simplifies inserting other ways of matching a string.
Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
grep.c | diff | blob | history |