summaryrefslogtreecommitdiff
path: root/builtin/grep.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/grep.c')
-rw-r--r--builtin/grep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/grep.c b/builtin/grep.c
index c4c6325941..1454bef496 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -1201,7 +1201,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
if (!seen_dashdash) {
int j;
for (j = i; j < argc; j++)
- verify_filename(prefix, argv[j], j == i);
+ verify_filename(prefix, argv[j], j == i && use_index);
}
parse_pathspec(&pathspec, 0,