Skip to content

Commit bc39564

Browse files
committed
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 <[email protected]>
1 parent c7cddc1 commit bc39564

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

builtin-grep.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,8 @@ static int external_grep(struct grep_opt *opt, const char **paths, int cached)
289289
push_arg("-E");
290290
if (opt->regflags & REG_ICASE)
291291
push_arg("-i");
292+
if (opt->binary == GREP_BINARY_NOMATCH)
293+
push_arg("-I");
292294
if (opt->word_regexp)
293295
push_arg("-w");
294296
if (opt->name_only)

0 commit comments

Comments
 (0)