git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] add core.pathspecGlob config option

From
Jeff King <peff@peff.net>
Date
Dec 19, 2012, 21:45 UTC
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:
Show 20 quoted lines
> Jeff King <peff@peff.net> 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
Previous: Junio C HamanoNext: Nguyen Thai Ngoc Duy
Message 11 of 18 in “add core.pathspecGlob config option”
  1. add core.pathspecGlob config optionJeff King, Dec 19, 2012
  2. Junio C HamanoDec 19, 2012
  3. Jeff KingDec 19, 2012
  4. add GIT_PATHSPEC_GLOB environment variableJeff King, Dec 19, 2012
  5. Junio C HamanoDec 19, 2012
  6. Jeff KingDec 19, 2012
  7. Junio C HamanoDec 19, 2012
  8. Jeff KingDec 19, 2012
  9. Jeff KingDec 19, 2012
  10. Junio C HamanoDec 19, 2012
  11. Jeff KingDec 19, 2012
  12. Nguyen Thai Ngoc DuyDec 20, 2012
  13. Jeff KingDec 20, 2012
  14. Junio C HamanoDec 20, 2012
  15. Jeff KingDec 20, 2012
  16. Jeff KingDec 20, 2012
  17. Jeff KingDec 20, 2012
  18. Junio C HamanoDec 20, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.