git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC 0/3] Support ignore rule "**" using wildmatch from rsync
@ 2012-05-07 13:01 Nguyễn Thái Ngọc Duy
  2012-05-07 13:01 ` [PATCH/RFC 1/3] Import " Nguyễn Thái Ngọc Duy
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Nguyễn Thái Ngọc Duy @ 2012-05-07 13:01 UTC (permalink / raw)
  To: git; +Cc: Nguyễn Thái Ngọc Duy

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-05-07 19:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-07 13:01 [PATCH/RFC 0/3] Support ignore rule "**" using wildmatch from rsync Nguyễn Thái Ngọc Duy
2012-05-07 13:01 ` [PATCH/RFC 1/3] Import " 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

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).