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

Re: [PATCH] add core.pathspecGlob config option

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Dec 20, 2012, 01:28 UTC
Message-ID
<CACsJy8BB3=3ZHD5Ua9M-0+98JVigHBBuo07gBSgEwanvB0zBSA@mail.gmail.com>
In-Reply-To
<20121219203449.GA10001@sigill.intra.peff.net>
On Thu, Dec 20, 2012 at 3:34 AM, Jeff King <peff@peff.net> wrote:
Show 6 quoted lines
> Part of me thinks this is just gross, because ":(noglob)" is the right
> solution. But after spending a few hours trying it this morning, there
> is a ton of refactoring required to make it work correctly everywhere
> (although we could die() if we see it in places that are not using
> init_pathspec, so at least we could say "not supported yet" and not just
> silently ignore it).

Yep, I'm still half way to converting everything to the new pathspec code. I'm not there yet. And things like this probably better goes with a config key or command line option, appending :(noglob) to every pathspec item is not pleasant. :(icase) may go the same way.

> So I think this is a nice, simple approach for sites that want it, and
> noglob magic can come later (and will not be any harder to implement as
> a result of this patch).

Any chance to make use of nd/pathspec-wildcard? It changes the same code path in match_one. If you base on top of nd/pathspec-wildcard, all you have to do is assign nowildcard_len to len (i.e. no wildcard part).

-- 
Duy
Previous: Jeff KingNext: Jeff King
Message 12 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.