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

Re: [PATCH] pathspec: rename per-item field has_wildcard to use_wildcard

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Apr 6, 2011, 15:54 UTC
Message-ID
<BANLkTikJ3=H_OgcNueMjnwwQ2W-2kamf=w@mail.gmail.com>
In-Reply-To
<7vr59gl581.fsf@alter.siamese.dyndns.org>
2011/4/6 Junio C Hamano <gitster@pobox.com>:
Show 11 quoted lines
>  * I was looking at the codepaths that would need to be touched in order
>   to properly support the "magic pathspec" we have been discussing, and
>   am leaning to conclude that all the users of get_pathspec() need to be
>   rewritten to throw the remainder of argv[] at a function that fills a
>   struct pathspec (in other words, a combination of get_pathspec() and
>   init_pathspec()).  Michael's "alternative approach to grep --full-tree"
>   was operating at the get_pathspec() level, but that function is an
>   interface to return an array of plain-vanilla strings only, and there
>   is no place to hook richer per-item information on the elements.  We
>   would need "struct pathspec" in the function where we parse the argv[]
>   and combine its elements with prefix.

I have started working on the conversion, but it may take a while because in many places pathspec is still assumed a prefix (and handled separately, which is not good for negative pathspec). Fundamental support for magic pathspec and "top dir" notation probably do not need get_pathspec() converted to struct pathspec.

-- 
Duy
Previous: Junio C HamanoNext: Junio C Hamano
Message 2 of 11 in “pathspec: rename per-item field has_wildcard to use_wildcard”
  1. pathspec: rename per-item field has_wildcard to use_wildcardJunio C Hamano, Apr 5, 2011
  2. Nguyen Thai Ngoc DuyApr 6, 2011
  3. Junio C HamanoApr 6, 2011
  4. Junio C HamanoApr 6, 2011
  5. Michael J GruberApr 7, 2011
  6. Nguyen Thai Ngoc DuyApr 7, 2011
  7. Junio C HamanoApr 7, 2011
  8. Junio C HamanoApr 7, 2011
  9. Michael J GruberApr 8, 2011
  10. Junio C HamanoApr 8, 2011
  11. Nguyen Thai Ngoc DuyApr 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.