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

[PATCH 0/5] New get_pathspec()

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Apr 9, 2011, 16:54 UTC
Message-ID
<1302368060-23827-1-git-send-email-pclouds@gmail.com>

This is on top of jc/magic-pathspec. It implements new get_pathspec(). Remaining work includes

 - implement verify_pathspec() (see notes on 5/5)
 - make use of pathspec_item.plain_len introduced in 3/5
 - convert the rest to use new get_pathspec(). Can we make it a GSoC
   project?
 - get rid of old pathspec code.
 - implement a whole lot more of pathspec magic.

I think that's it. We also need to think if we can use similar syntax for gitattr/gitignore, reuse as much code as possible.

[PATCH 1/5] Rename functions in preparation for get_pathspec() restructure
  I figure I cannot bring all commands to the new get_pathspec() at
  once and remove the old one. So instead I rename the old one so that
  we can have both implementations running in parallel.
[PATCH 2/5] Replace has_wildcard with PATHSPEC_NOGLOB
  This effectively kills Junio's use_wildcard rename patch.
[PATCH 3/5] Convert prefix_pathspec() to produce struct pathspec_item
  Also put plain_len field in place for literal matching on prefix.
  Nobody uses it yet though.
[PATCH 4/5] Implement new get_pathspec()
  I don't move prefix_pathspec() to dir.c yet. It may need some
  updates until things are stablized. It will be moved at latest when
  get_pathspec_old() is retired.
[PATCH 5/5] grep: convert to use the new get_pathspec()
  The first user of the new get_pathspec(), just to make sure I don't
  introduce too many bugs.
  The verify_filename() issue remains. I suggest we keep an
  incarnation of it to catch simple pathspecs, then implement
  verify_pathspec() for wildcard pathspecs.
 archive.c              |    2 +-
 builtin/add.c          |    6 ++--
 builtin/checkout.c     |    8 ++--
 builtin/clean.c        |    4 +-
 builtin/commit.c       |    6 ++--
 builtin/grep.c         |   14 ++------
 builtin/ls-files.c     |    8 ++--
 builtin/ls-tree.c      |    2 +-
 builtin/mv.c           |    2 +-
 builtin/rerere.c       |    2 +-
 builtin/reset.c        |    4 +-
 builtin/rm.c           |    4 +-
 builtin/update-index.c |    2 +-
 cache.h                |   26 +++++++++++++--
 dir.c                  |   81 +++++++++++++++++++++++++++++++++++------------
 dir.h                  |    4 +-
 read-cache.c           |    4 +-
 rerere.c               |    2 +-
 resolve-undo.c         |    2 +-
 revision.c             |    2 +-
 setup.c                |   45 +++++++++++---------------
 tree-walk.c            |   25 +++++++--------
 wt-status.c            |    4 +-
 23 files changed, 151 insertions(+), 108 deletions(-)
-- 
1.7.4.74.g639db
Next: Nguyễn Thái Ngọc Duy
Message 1 of 11 in “New get_pathspec()”
  1. 0/5 New get_pathspec()Nguyễn Thái Ngọc Duy, Apr 9, 2011
  2. 1/5 Rename functions in preparation for get_pathspec() restructureNguyễn Thái Ngọc Duy, Apr 9, 2011
  3. 2/5 Replace has_wildcard with PATHSPEC_NOGLOBNguyễn Thái Ngọc Duy, Apr 9, 2011
  4. Junio C HamanoApr 10, 2011
  5. Nguyen Thai Ngoc DuyApr 10, 2011
  6. 3/5 Convert prefix_pathspec() to produce struct pathspec_itemNguyễn Thái Ngọc Duy, Apr 9, 2011
  7. 4/5 Implement new get_pathspec()Nguyễn Thái Ngọc Duy, Apr 9, 2011
  8. 5/5 grep: convert to use the new get_pathspec()Nguyễn Thái Ngọc Duy, Apr 9, 2011
  9. Junio C HamanoApr 10, 2011
  10. Nguyen Thai Ngoc DuyApr 10, 2011
  11. Junio C HamanoApr 9, 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.