summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6db5c6e)
raw | patch | inline | side by side (parent: 6db5c6e)
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | |
Sat, 14 Jan 2012 09:23:22 +0000 (16:23 +0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 15 Jan 2012 02:39:04 +0000 (18:39 -0800) |
It's actually unlimited recursion if wildcards are active regardless
--max-depth
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
--max-depth
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-grep.txt | patch | blob | history | |
tree-walk.c | patch | blob | history |
index 15d6711d46754e9659561b4372b46ec3c6654d6b..6a8b1e3a7d06218903ce5614f51c4e7cbba73b17 100644 (file)
--max-depth <depth>::
For each <pathspec> given on command line, descend at most <depth>
levels of directories. A negative value means no limit.
+ This option is ignored if <pathspec> contains active wildcards.
+ In other words if "a*" matches a directory named "a*",
+ "*" is matched literally so --max-depth is still effective.
-w::
--word-regexp::
diff --git a/tree-walk.c b/tree-walk.c
index f82dba6a1f43bf2a259952a4fd6db94d6335deb7..492c7cd744d5f0739c8393ab67705c0be1254783 100644 (file)
--- a/tree-walk.c
+++ b/tree-walk.c
/*
* Match all directories. We'll try to match files
* later on.
+ * max_depth is ignored but we may consider support it
+ * in future, see
+ * http://thread.gmane.org/gmane.comp.version-control.git/163757/focus=163840
*/
if (ps->recursive && S_ISDIR(entry->mode))
return entry_interesting;