Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH v3] grep: Add --max-depth option.

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:05

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help