From: Jeff King Date: Wed, 19 Dec 2012 21:45:01 GMT Subject: Re: [PATCH] add core.pathspecGlob config option Message-ID: <20121219214500.GA12705@sigill.intra.peff.net> In-Reply-To: <7vfw3191bi.fsf@alter.siamese.dyndns.org> On Wed, Dec 19, 2012 at 01:30:57PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > diff --git a/dir.c b/dir.c > > index 5a83aa7..6e81d4f 100644 > > --- a/dir.c > > +++ b/dir.c > > @@ -126,7 +126,7 @@ static int match_one(const char *match, const char *name, int namelen) > > for (;;) { > > unsigned char c1 = tolower(*match); > > unsigned char c2 = tolower(*name); > > - if (c1 == '\0' || is_glob_special(c1)) > > + if (c1 == '\0' || (core_pathspec_glob && is_glob_special(c1))) > > break; > > if (c1 != c2) > > return 0; > > I think you can also do the same to the common_prefix(); we check > for common leading directory prefix but punt upon seeing a directory > component that has a glob character, and under the "literal" mode, > it is not a special character. Yeah, I think you're right. Will add to my re-roll. -Peff