From: Junio C Hamano Date: Wed, 22 Jul 2009 17:08:44 GMT Subject: Re: [PATCH v3] grep: Add --max-depth option. Message-ID: <7veis8myqr.fsf@alter.siamese.dyndns.org> In-Reply-To: <4A66BB64.5070106@gmail.com> Thanks for a review. With the suggested changes the patch looks better. I had to wonder what would happen when you give an input like this, though: $ git grep --max-depth=1 t Documentation/howto If you look at the way the loop in pathspec_matches() is structured, it becomes clear that the depth limit is applied independently to each of the pathspecs given on the command line, and re-reading the description of the option in the documentation _with_ that knowledge it becomes obvious what should happen, but I couldn't figure it out before looking at the code. Perhaps the documentation needs a bit more verbosity? I dunno.