grep: Allow case insensitive search of fixed-strings

"git grep" currently an error when you combine the -F and -i flags.
This isn't in line with how GNU grep handles it.

This patch allows the simultaneous use of those flags.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Brian Collins <bricollins@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Brian Collins
2009-11-06 01:22:35 -08:00
committed by Junio C Hamano
parent 78d553b7d7
commit 5183bf6727
4 changed files with 27 additions and 6 deletions

2
grep.h
View File

@ -32,6 +32,7 @@ struct grep_pat {
enum grep_header_field field;
regex_t regexp;
unsigned fixed:1;
unsigned ignore_case:1;
unsigned word_regexp:1;
};
@ -64,6 +65,7 @@ struct grep_opt {
regex_t regexp;
int linenum;
int invert;
int ignore_case;
int status_only;
int name_only;
int unmatch_name_only;