Support ignore rule "**" using wildmatch from rsync
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | Import wildmatch from rsynccompat/ compat/ t/ +1 more | +755 | 0 replies | |
| 2/3 | Integrate wildmatch to gitMakefile compat/ t/ +1 more | +167 | 0 replies | |
| 3/3 | gitignore: support "**" with wildmatch()dir.c dir.h | +17 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH/RFC 0/3] Support ignore rule "**" using wildmatch from rsync
I've been looking for something like this. Bash 4 has a similar feature, but it's GPL-3. rsync is also GPL-3. Luckily this feature was availble before the license change.
I'm not sure if we should import wildmatch just to support "**". It seems a nice and often requested feature. And the code looks more readable than compat/fnmatch, which is good since I don't think we can cherry pick from (gpl3) upstream.
We would need to add case folding support or convert "abc" to "[aA][bB][cC]". Performance vs fnmatch is another question but we could switch to wildmatch only in the presence of "**" if wildmatch perf sucks. Even pathspec may make use of this, thanks to pathspec magic.
I have not looked carefully at it and this series is more like a proof of concept than a candidate for 'pu'. Any comments in favor or oppose this?
Nguyễn Thái Ngọc Duy (3):
Import wildmatch from rsync
Integrate wildmatch to git
gitignore: support "**" with wildmatch()
Makefile | 3 + compat/wildmatch.c | 356 ++++++++++++++++++++++++++++++++++++++++ compat/wildmatch.h | 6 + dir.c | 20 ++- dir.h | 1 + t/t3070-wildmatch.sh | 27 +++ t/t3070-wildmatch/wildtest.txt | 165 +++++++++++++++++++ test-wildmatch.c | 162 ++++++++++++++++++ 8 files changed, 736 insertions(+), 4 deletions(-) create mode 100644 compat/wildmatch.c create mode 100644 compat/wildmatch.h create mode 100755 t/t3070-wildmatch.sh create mode 100644 t/t3070-wildmatch/wildtest.txt create mode 100644 test-wildmatch.c
Signature · 1 line
1.7.8.36.g69ee2