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

[PATCH 0/6] Negation magic pathspec

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Oct 11, 2011, 22:44 UTC
Message-ID
<1318373083-13840-1-git-send-email-pclouds@gmail.com>

After the last round toying with .gitignore mechanism as a way to exclude paths, I have finally got back to the negative pathspec.

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.

The nice thing about this series is that negative pathspec patch is small and simple, much less headache to review than the previous version (and as a consequence, not as powerful).

So here it is to gather comments whether we should go this way. Very much WIP, I have not even run "make test".

Nguyễn Thái Ngọc Duy (6):
  Recognize magic pathspec as filenames
  Replace has_wildcard with PATHSPEC_NOGLOB
  Convert prefix_pathspec() to produce struct pathspec_item
  Implement parse_pathspec()
  Convert simple init_pathspec() cases to parse_pathspec()
  Implement negative pathspec
 Documentation/glossary-content.txt |    8 ++--
 builtin/grep.c                     |    4 +-
 builtin/ls-files.c                 |    2 +-
 builtin/ls-tree.c                  |    6 +-
 builtin/reset.c                    |    2 +-
 cache.h                            |   29 +++++++++++-
 dir.c                              |   85 +++++++++++++++++++++++++++--------
 revision.c                         |    9 ++--
 setup.c                            |   56 +++++++++++-------------
 tree-walk.c                        |   44 ++++++++++++++++---
 10 files changed, 169 insertions(+), 76 deletions(-)
-- 
1.7.3.1.256.g2539c.dirty
Next: Nguyễn Thái Ngọc Duy
Message 1 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.