aboutsummaryrefslogtreecommitdiff
path: root/builtin-grep.c
diff options
context:
space:
mode:
authorRobert Fitzsimons <robfitz@273k.net>2006-06-06 23:15:16 +0000
committerJunio C Hamano <junkio@cox.net>2006-06-06 16:22:45 -0700
commit3026402cbc60c003c4bc043368afc619e4d9b3cd (patch)
tree43a4dde385975060d98cfe71835d123fa57c0293 /builtin-grep.c
parentdd8239f997962d94162790039b008acb6068a242 (diff)
downloadgit-3026402cbc60c003c4bc043368afc619e4d9b3cd.tar.gz
git-3026402cbc60c003c4bc043368afc619e4d9b3cd.tar.xz
builtin-grep: pass ignore case option to external grep
Don't just read the --ignore-case/-i option, pass the flag on to the external grep program. Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-grep.c')
-rw-r--r--builtin-grep.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-grep.c b/builtin-grep.c
index acc4eea36..5fac5701e 100644
--- a/builtin-grep.c
+++ b/builtin-grep.c
@@ -459,6 +459,8 @@ static int external_grep(struct grep_opt *opt, const char **paths, int cached)
push_arg("-n");
if (opt->regflags & REG_EXTENDED)
push_arg("-E");
+ if (opt->regflags & REG_ICASE)
+ push_arg("-i");
if (opt->word_regexp)
push_arg("-w");
if (opt->name_only)