Document limited recursion pathspec matching with wildcards

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>

Nguyễn Thái Ngọc Duy committed Jan 14, 2012 at 16:23 UTC 8c69c1f92eb79a597225814781fdf1ab4be26758
2 files changed +6
Documentation/git-grep.txt
+3
@@ -79,6 +79,9 @@ OPTIONS
79 --max-depth <depth>::
80 For each <pathspec> given on command line, descend at most <depth>
81 levels of directories. A negative value means no limit.
82 + This option is ignored if <pathspec> contains active wildcards.
83 + In other words if "a*" matches a directory named "a*",
84 + "*" is matched literally so --max-depth is still effective.
85
86 -w::
87 --word-regexp::
tree-walk.c
+3
@@ -661,6 +661,9 @@ match_wildcards:
661 /*
662 * Match all directories. We'll try to match files
663 * later on.
664 + * max_depth is ignored but we may consider support it
665 + * in future, see
666 + * http://thread.gmane.org/gmane.comp.version-control.git/163757/focus=163840
667 */
668 if (ps->recursive && S_ISDIR(entry->mode))
669 return entry_interesting;