summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-02-02 10:58:20 -0800
committerJunio C Hamano <gitster@pobox.com>2009-02-02 10:58:20 -0800
commitbc395643b606ffe7a5c01e2772ae0644c840f368 (patch)
tree29537f93d5905ca2dd518b1c8790f67246c3b933
parentc7cddc1a2f365e4f4aea71b700c0b833eb436fee (diff)
downloadgit-bc395643b606ffe7a5c01e2772ae0644c840f368.tar.gz
grep: pass -I (ignore binary) down to external grep
We forgot to pass this option to the external grep process. Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin-grep.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-grep.c b/builtin-grep.c
index 3a51662a35..d3cc75e3a4 100644
--- a/builtin-grep.c
+++ b/builtin-grep.c
@@ -289,6 +289,8 @@ static int external_grep(struct grep_opt *opt, const char **paths, int cached)
push_arg("-E");
if (opt->regflags & REG_ICASE)
push_arg("-i");
+ if (opt->binary == GREP_BINARY_NOMATCH)
+ push_arg("-I");
if (opt->word_regexp)
push_arg("-w");
if (opt->name_only)