Skip to content

Fancy pathspec stuff

Nguyễn Thái Ngọc Duy git 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10pathspec: allow to use alternate char for quoting long magic mnemonicsetup.c+24 -60 replies
2/10parse_pathspec: make sure the prefix part is wildcard-freecache.h path.c setup.c +1 more+78 -90 replies
3/10pathspec: support :(literal) syntax for noglob pathspecarchive.c builtin/add.c builtin/checkout.c +17 more+70 -260 replies
4/10parse_pathspec: save prefix informationcache.h setup.c+2 -10 replies
5/10pathspec: prepare for :(glob)path syntaxbuiltin/add.c cache.h dir.c +3 more+40 -240 replies
6/10Enable :(glob)path syntax for a lot of commandsbuiltin/add.c builtin/checkout.c builtin/clean.c +9 more+39 -130 replies
7/10parse_pathspec: accept :(icase)path syntaxcache.h setup.c+2 -10 replies
8/10common_prefix/read_directory: treat PATHSPEC_ICASE like wildcardsdir.c+13 -50 replies
9/10pathspec: support icase in match_pathspec_depth and tree_entry_interestingcache.h dir.c tree-walk.c+47 -180 replies
10/10Enable ls-files and ls-tree for testing PATHSPEC_ICASEbuiltin/add.c builtin/ls-files.c builtin/ls-tree.c+8 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH/WIP 00/10] Fancy pathspec stuff

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
Signature · 1 line
1.8.0.rc2.23.g1fb49df