From: Junio C Hamano Date: Wed, 29 Sep 2010 04:29:01 GMT Subject: Re: [PATCH 0/6] Introduce pathspec struct Message-ID: <7vvd5pqik2.fsf@alter.siamese.dyndns.org> In-Reply-To: <4CA2789A.7090306@ripton.net> David Ripton writes: > On 09/28/10 04:37, Junio C Hamano wrote: > >> - David's "git grep --exclude-dir D" topic should be able to internally >> use the same negative pathspec mechanism. At the command line level, >> it allows (and needs to allow) only the leading prefix (which is how >> GNU grep's --exclude-dir works), but it makes tons of sense for us to >> allow "--exclude $pattern" from the command line, and share the >> mechanism internally between the two. > > I don't think GNU grep's --exclude-dir only allows the leading > prefix. Heh, I was half expecting to hear that after I wrote it ;-) What I meant was "pattern matches against the leading path, excluding the basename part" (as the option is exclude-DIR, that is more or less by definition).