From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH/RFC 0/3] Support ignore rule "**" using wildmatch from rsync
Date: Mon, 7 May 2012 20:01:54 +0700 [thread overview]
Message-ID: <1336395717-7799-1-git-send-email-pclouds@gmail.com> (raw)
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
next reply other threads:[~2012-05-07 13:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-07 13:01 Nguyễn Thái Ngọc Duy [this message]
2012-05-07 13:01 ` [PATCH/RFC 1/3] Import wildmatch from rsync Nguyễn Thái Ngọc Duy
2012-05-07 13:01 ` [PATCH/RFC 2/3] Integrate wildmatch to git Nguyễn Thái Ngọc Duy
2012-05-07 13:01 ` [PATCH/RFC 3/3] gitignore: support "**" with wildmatch() Nguyễn Thái Ngọc Duy
2012-05-07 19:05 ` [PATCH/RFC 0/3] Support ignore rule "**" using wildmatch from rsync Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1336395717-7799-1-git-send-email-pclouds@gmail.com \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).