[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_ICASEarchive.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