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

Re: [PATCH 0/6] Negation magic pathspec

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 11, 2011, 23:17 UTC
Message-ID
<7vwrcbce4w.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1318373083-13840-1-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
> I'm still struggling with read_directory() rewrite so that struct
> pathspec can be used throughout git, but now realized we can at least
> enable magic for certain commands and die() on those that don't.
> This may help move magic pathspec patches forward.

I actually was thinking that teaching those that take bare "const char **" to take "struct pathspec *" is much more important conversion before adding more magic to those that already do take "struct pathspec *". The ones that ask "does this path match the pathspec" would automatically start honoring negative or quantum or whatever magic once we teach the magic to match_pathspec(), but the ones that take "const char **" will have no way of doing so before getting converted to "struct pathspec *" interface. If some parts of the system knows more magic and people start playing with them, the lack of the support in codepaths that haven't been converted will become real pain point.

That is not to say that these 6 patch series are wasted patches. I just think it may be doing things in a wrong order.

Previous: Nguyễn Thái Ngọc Duy
Message 12 of 12 in “Negation magic pathspec”
  1. 0/6 Negation magic pathspecNguyễn Thái Ngọc Duy, Oct 11, 2011
  2. 1/6 Recognize magic pathspec as filenamesNguyễn Thái Ngọc Duy, Oct 11, 2011
  3. Junio C HamanoOct 12, 2011
  4. Nguyen Thai Ngoc DuyOct 13, 2011
  5. Junio C HamanoOct 13, 2011
  6. 2/6 Replace has_wildcard with PATHSPEC_NOGLOBNguyễn Thái Ngọc Duy, Oct 11, 2011
  7. 3/6 Convert prefix_pathspec() to produce struct pathspec_itemNguyễn Thái Ngọc Duy, Oct 11, 2011
  8. 4/6 Implement parse_pathspec()Nguyễn Thái Ngọc Duy, Oct 11, 2011
  9. 5/6 Convert simple init_pathspec() cases to parse_pathspec()Nguyễn Thái Ngọc Duy, Oct 11, 2011
  10. Junio C HamanoOct 13, 2011
  11. 6/6 Implement negative pathspecNguyễn Thái Ngọc Duy, Oct 11, 2011
  12. Junio C HamanoOct 11, 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.