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

[PATCH/WIP 00/10] Fancy pathspec stuff

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Jan 13, 2013, 12:49 UTC
Message-ID
<1358081379-17752-1-git-send-email-pclouds@gmail.com>

I wanted to see how new pathspec feature can be implemented after nd/parse-pathspec, mainly to see if nd/parse-pathspec needs fixing. It's nowhere near 'pu' quality but may be interesting for some people.

It does:
- introduce :q/.../ syntax in addition to :(...), which always
  requires quoting in bash
- separate prefix part from the rest of pathspec, allowing it to be
  treated differently (e.g. prefix is matched exactly regardless
  pathspec magic)
- implement :(glob) using wildmatch (i.e. incompatible with the
  wildcards that current pathspec uses)
- implement :(icase) -- with bugs
- implement :(literal), similar to --literal-pathspecs
That's all my spam for today.
Nguyễn Thái Ngọc Duy (10):
  pathspec: allow to use alternate char for quoting long magic mnemonic
  parse_pathspec: make sure the prefix part is wildcard-free
  pathspec: support :(literal) syntax for noglob pathspec
  parse_pathspec: save prefix information
  pathspec: prepare for :(glob)path syntax
  Enable :(glob)path syntax for a lot of commands
  parse_pathspec: accept :(icase)path syntax
  common_prefix/read_directory: treat PATHSPEC_ICASE like wildcards
  pathspec: support icase in match_pathspec_depth and
    tree_entry_interesting
  Enable ls-files and ls-tree for testing PATHSPEC_ICASE
 archive.c                  |  4 ++-
 builtin/add.c              | 19 +++++++++++---
 builtin/checkout.c         |  6 ++++-
 builtin/clean.c            |  6 ++++-
 builtin/commit.c           | 10 +++++--
 builtin/diff.c             |  2 +-
 builtin/grep.c             |  6 ++++-
 builtin/ls-files.c         |  6 ++++-
 builtin/ls-tree.c          |  7 ++++-
 builtin/rerere.c           |  6 ++++-
 builtin/reset.c            |  6 ++++-
 builtin/rm.c               |  6 ++++-
 builtin/update-index.c     |  6 ++++-
 cache.h                    | 23 +++++++++++++++-
 dir.c                      | 60 ++++++++++++++++++++++++++++--------------
 dir.h                      |  8 +++---
 path.c                     | 15 ++++++++++-
 revision.c                 |  7 +++--
 setup.c                    | 65 +++++++++++++++++++++++++++++++++-------------
 t/t6130-pathspec-noglob.sh | 18 +++++++++++++
 t/t6131-pathspec-prefix.sh | 47 +++++++++++++++++++++++++++++++++
 tree-diff.c                |  2 +-
 tree-walk.c                | 39 +++++++++++++++++-----------
 23 files changed, 295 insertions(+), 79 deletions(-)
 create mode 100755 t/t6131-pathspec-prefix.sh
-- 
1.8.0.rc2.23.g1fb49df
Next: Nguyễn Thái Ngọc Duy
Message 1 of 11 in “Fancy pathspec stuff”
  1. 00/10 Fancy pathspec stuffNguyễn Thái Ngọc Duy, Jan 13, 2013
  2. 01/10 pathspec: allow to use alternate char for quoting long magic mnemonicNguyễn Thái Ngọc Duy, Jan 13, 2013
  3. 02/10 parse_pathspec: make sure the prefix part is wildcard-freeNguyễn Thái Ngọc Duy, Jan 13, 2013
  4. 03/10 pathspec: support :(literal) syntax for noglob pathspecNguyễn Thái Ngọc Duy, Jan 13, 2013
  5. 04/10 parse_pathspec: save prefix informationNguyễn Thái Ngọc Duy, Jan 13, 2013
  6. 05/10 pathspec: prepare for :(glob)path syntaxNguyễn Thái Ngọc Duy, Jan 13, 2013
  7. 06/10 Enable :(glob)path syntax for a lot of commandsNguyễn Thái Ngọc Duy, Jan 13, 2013
  8. 07/10 parse_pathspec: accept :(icase)path syntaxNguyễn Thái Ngọc Duy, Jan 13, 2013
  9. 08/10 common_prefix/read_directory: treat PATHSPEC_ICASE like wildcardsNguyễn Thái Ngọc Duy, Jan 13, 2013
  10. 09/10 pathspec: support icase in match_pathspec_depth and tree_entry_interestingNguyễn Thái Ngọc Duy, Jan 13, 2013
  11. 10/10 Enable ls-files and ls-tree for testing PATHSPEC_ICASENguyễn Thái Ngọc Duy, Jan 13, 2013

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.