summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-02-03 00:32:34 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-02-03 00:32:34 -0800
commitbd9efbf35424c9436f62768e47f5819c9b5bcf9e (patch)
treed309a0d84a7463f7f94689fd6ead90b3621b4979
parentMerge branch 'jc/maint-add-u-remove-conflicted' (diff)
parentMerge branch 'maint-1.6.0' into maint (diff)
downloadtgif-bd9efbf35424c9436f62768e47f5819c9b5bcf9e.tar.xz
Merge branch 'maint'
* maint: grep: pass -I (ignore binary) down to external grep
-rw-r--r--builtin-grep.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-grep.c b/builtin-grep.c
index bebf15cd6f..3f12ba3826 100644
--- a/builtin-grep.c
+++ b/builtin-grep.c
@@ -291,6 +291,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)