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

Re: [PATCH 2/4] add -u: get rid of "treewideupdate" configuration

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Apr 9, 2011, 10:15 UTC
Message-ID
<BANLkTi=yvA1Pa2dVa2zC4ED8ZXcWDoqLPQ@mail.gmail.com>
In-Reply-To
<7vy63kyp9n.fsf@alter.siamese.dyndns.org>
On Sat, Apr 9, 2011 at 12:20 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
> By the way, the field in "struct pathspec_item" would need to be updated,
> and the matcher would need to be changed, so that each item knows up to
> which part of the "match" string came from the prefix (and remainder is a
> user supplied pattern).  Then from a subdirectory a?a/bbb,
>
>  - "c" should parse into prefix "a?a/bbb/" plus pattern "c"
>
>  - ":../c" should become prefix "a?a/" plus pattern "c"
>
> and the matcher should match the prefix part _literally_ without
> fnmatch(3), while using whatever magic (e.g. use_wildcard) to match the
> pattern part.  I think we currently match the whole thing with fnmatch(3),
> which in practice may be OK only because not many people use glob
> characters in their directory names, but what the current matcher does
> logically is wrong.

OK. Let's add nomagic_len (or plain_len) to pathspec_item for that. I was thinking of noglob_len but changed my mind because the same can also be applied for icase magic. We don't want to do strcasecmp on prefix.

> Of course, both of the above are tasks after 1.7.5 ships, but I thought I
> should mention them now, as you seem to be already thinking about the
> future.
-- 
Duy
Previous: Junio C HamanoNext: Nguyen Thai Ngoc Duy
Message 28 of 35 in “Redoing the "add -u" migration plan”
  1. 0/4 Redoing the "add -u" migration planJunio C Hamano, Apr 7, 2011
  2. 1/4 magic pathspec: add tentative ":/path/from/top/level" pathspec supportJunio C Hamano, Apr 7, 2011
  3. Junio C HamanoApr 7, 2011
  4. Nguyen Thai Ngoc DuyApr 7, 2011
  5. Junio C HamanoApr 7, 2011
  6. Nguyen Thai Ngoc DuyApr 8, 2011
  7. Nguyen Thai Ngoc DuyApr 7, 2011
  8. Junio C HamanoApr 7, 2011
  9. Nguyen Thai Ngoc DuyApr 8, 2011
  10. Junio C HamanoApr 8, 2011
  11. Nguyen Thai Ngoc DuyApr 8, 2011
  12. Junio C HamanoApr 8, 2011
  13. Nguyen Thai Ngoc DuyApr 8, 2011
  14. 2/4 add -u: get rid of "treewideupdate" configurationJunio C Hamano, Apr 7, 2011
  15. Jeff KingApr 8, 2011
  16. Junio C HamanoApr 8, 2011
  17. Jeff KingApr 8, 2011
  18. Junio C HamanoApr 8, 2011
  19. Jeff KingApr 8, 2011
  20. Junio C HamanoApr 8, 2011
  21. Junio C HamanoApr 8, 2011
  22. Nguyen Thai Ngoc DuyApr 9, 2011
  23. Junio C HamanoApr 9, 2011
  24. Nguyen Thai Ngoc DuyApr 9, 2011
  25. Junio C HamanoApr 9, 2011
  26. Nguyen Thai Ngoc DuyApr 9, 2011
  27. Junio C HamanoApr 9, 2011
  28. Nguyen Thai Ngoc DuyApr 9, 2011
  29. Nguyen Thai Ngoc DuyApr 9, 2011
  30. Junio C HamanoApr 9, 2011
  31. Nguyen Thai Ngoc DuyMay 3, 2011
  32. Junio C HamanoMay 3, 2011
  33. Nguyen Thai Ngoc DuyMay 3, 2011
  34. 3/4 add: make "add -u/-A" update full tree without pathspec (step 2)Junio C Hamano, Apr 7, 2011
  35. 4/4 add: make "add -u/-A" update full tree without pathspec (step 3)Junio C Hamano, Apr 7, 2011

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.