提交 63bf941e 编写于 作者: J Junio C Hamano

Merge branch 'jc/grep--no-index-pathspec-fix'

* jc/grep--no-index-pathspec-fix:
  grep --no-index: honor pathspecs correctly
......@@ -626,6 +626,10 @@ static int grep_directory(struct grep_opt *opt, const struct pathspec *pathspec)
fill_directory(&dir, pathspec->raw);
for (i = 0; i < dir.nr; i++) {
const char *name = dir.entries[i]->name;
int namelen = strlen(name);
if (!match_pathspec_depth(pathspec, name, namelen, 0, NULL))
continue;
hit |= grep_file(opt, dir.entries[i]->name);
if (hit && opt->status_only)
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册