From: Nguyễn Thái Ngọc Duy Date: Mon, 07 May 2012 13:01:54 GMT Subject: [PATCH/RFC 0/3] Support ignore rule "**" using wildmatch from rsync Message-ID: <1336395717-7799-1-git-send-email-pclouds@gmail.com> 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 -- 1.7.8.36.g69ee2