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>
Junio C Hamano committed
Feb 2, 2009 at 10:58 UTC
bc395643b606ffe7a5c01e2772ae0644c840f368
1 file changed
+2
builtin-grep.c
+2
@@ -289,6 +289,8 @@ static int external_grep(struct grep_opt *opt, const char **paths, int cached)
289
push_arg("-E");
290
if (opt->regflags & REG_ICASE)
291
push_arg("-i");
292
+ if (opt->binary == GREP_BINARY_NOMATCH)
293
+ push_arg("-I");
294
if (opt->word_regexp)
295
push_arg("-w");
296
if (opt->name_only)