Re: [PATCH/RFC 2/2] grep: make --full-tree work with pathspecs
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 1, 2011, 19:20 UTC
- Message-ID
- <7v8vwyejfu.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <3719d9a120eef618d875629662a87e715de55d4e.1298972832.git.git@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
> When --full-tree is given, make the pathspecs be applied relative to the > root. That way, "git grep --full-tree expr -- *.c" looks in all C files in > the repo.
This is basically Ok, but I wonder if this has funny interaction with rev/path disambiguation. What happens to these two "git grep", and what should happen?
cd Documentation
git grep --full-tree index technical
git grep --full-tree index Documentation/technicalOnce you said --full-tree, "technical" does not refer to Documentation/technical so the first one should probably say "technical is not a rev and there is no such path" while the second one should know Documentation/technical/ is a pathspec, perhaps?