Re: grep --no-index and pathspec
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 11, 2011, 18:27 UTC
- Message-ID
- <7v8vxm1l6q.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <4D55500B.1070603@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
Show 6 quoted lines
> "grep --no-index" and "grep" have different codepaths for looking up the > files/blobs. If I read that correctly then "grep --no-index -- pathspec" > only does a literal match at the left boundary, whereas for the normal > mode glob patterns are allowed. > > CC'ing Junio who created "--no-index".
Anything with --no-index is a quick hack, so I wouldn't be surprised if it ignored the normal pathspec logic. As I do not recall the details of the particular codepath and offhand do not know how involved a change to pay proper attention to the pathspecs would be, but I suspect that it would be more appropriate to fix it on top of nd/struct-pathspec topic than writing the current behaviour down in the documentation outside of BUGS section as if it were a feature ;-).