wildmatch part 2
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 5 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | attr: remove the union in struct match_attrattr.c | +12 | 0 replies | |
| 2/6 | attr: avoid strlen() on every matchattr.c | +4 | 0 replies | |
| 3/6 | attr: avoid searching for basename on every matchattr.c | +9 | 0 replies | |
| 4/6 | attr: more matching optimizations from .gitignoreattr.c dir.c dir.h | +57 | 0 replies | |
| 5/6 | gitignore: do not do basename match with patterns that have '**'Documentation/ attr.c dir.c +2 more | +33 | 3 replies | |
| 6/6 | t3001: note about expected "**" behaviort/ | +8 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/6] wildmatch part 2
Quoted 1 line · Junio C Hamano
Perhaps the wildmatch code may not be what we want X-<.
When I imported wildmatch I was hoping to make minimum changes to it. But wildmatch is probably the only practical way to support "**" even if we later need to change it the way we want. Other options are base our work on top of compat/fnmatch.c, which is an #ifdef spaghetti mess, or write a new fnmatch()-compatible function. Both unattractive to me.
Anyway, this is on top of nd/wildmatch, which makes "ab**cd" match full pathname.
attr patches port .gitignore optimizations over. In long term, we should probably have a shared matching implementation instead. I tried that road once and failed so I won't attempt again any time soon. If we drop wildmatch, I can split these attr patches out as a separate series. It's a good thing to do anyway.
The last patch just reflects that current "**" is not exactly what we want. I'm not sure if I could look into wildmatch.c and change it. Anybody is welcome to step up, of course.
Nguyễn Thái Ngọc Duy (6):
attr: remove the union in struct match_attr
attr: avoid strlen() on every match
attr: avoid searching for basename on every match
attr: more matching optimizations from .gitignore
gitignore: do not do basename match with patterns that have '**'
t3001: note about expected "**" behavior
Documentation/gitignore.txt | 10 ++-- attr.c | 101 +++++++++++++++++++++++++++---------- dir.c | 6 +-- dir.h | 2 + t/t0003-attributes.sh | 16 ++++++ t/t3001-ls-files-others-exclude.sh | 18 +++++++ 6 files changed, 118 insertions(+), 35 deletions(-)
Signature · 1 line
1.7.12.1.405.gb727dc9