Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
add: convert to use parse_pathspec
[gitweb.git]
/
builtin
/
grep.c
diff --git
a/builtin/grep.c
b/builtin/grep.c
index 1a6c02804c7f027b1da668f25b948f0d3e951519..4bc075422e3c17e7666ed90e4a35be020586be49 100644
(file)
--- a/
builtin/grep.c
+++ b/
builtin/grep.c
@@
-858,7
+858,8
@@
int cmd_grep(int argc, const char **argv, const char *prefix)
}
parse_pathspec(&pathspec, 0,
- PATHSPEC_PREFER_CWD,
+ PATHSPEC_PREFER_CWD |
+ (opt.max_depth != -1 ? PATHSPEC_MAXDEPTH_VALID : 0),
prefix, argv + i);
pathspec.max_depth = opt.max_depth;
pathspec.recursive = 1;