git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/8] wildmatch take 3
@ 2012-10-09  3:08 Nguyễn Thái Ngọc Duy
  2012-10-09  3:09 ` [PATCH 1/8] Import wildmatch from rsync Nguyễn Thái Ngọc Duy
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: Nguyễn Thái Ngọc Duy @ 2012-10-09  3:08 UTC (permalink / raw)
  To: git; +Cc: Nguyễn Thái Ngọc Duy

Still experimental but the semantics is getting better, I think.
Please point out what you think still does not make sense. Quote from
the last patch:

  Two consecutive asterisks ("`**`") in patterns matched against
  full pathname may have special meaning:
  
   - A leading "`**`" followed by a slash means match in all
     directories. For example, "`**/foo`" matches file or directory
     "`foo`" anywhere, the same as pattern "`foo`". "**/foo/bar"
     matches file or directory "`bar`" anywhere that is directly
     under directory "`foo`".
  
   - A trailing "/**" matches everything inside. For example,
     "abc/**" is equivalent to "`/abc/`".
  
   - A slash followed by two consecutive asterisks then a slash
     matches zero or more directories. For example, "`a/**/b`"
     matches "`a/b`", "`a/x/b`", "`a/x/y/b`" and so on.
  
   - Consecutive asterisks otherwise are treated like normal
     asterisk wildcards.

"abc/**" and "abc/*" are different in attr (the former matches all
files, the latter only files directly under abc) while they are the
same for ignore. I don't like these subtleties but I don't
think we have a choice unless we rework attr matching machinery.

Tests t3070.100 and .101 fail on some machine and not on other due to
(I guess) fnmatch behavior changes. Maybe we should fallback on
compat/fnmatch in such cases for consistent behavior.

There are problems with asciidoc and "`**/`" but that's not something
we need to care now.

On top of master (and a small conflict with nd/attr-match-optim-more)

Nguyễn Thái Ngọc Duy (8):
  Import wildmatch from rsync
  wildmatch: remove unnecessary functions
  Integrate wildmatch to git
  wildmatch: remove static variable force_lower_case
  wildmatch: fix case-insensitive matching
  wildmatch: adjust "**" behavior
  wildmatch: make /**/ match zero or more directories
  Support "**" wildcard in .gitignore and .gitattributes

 .gitignore                         |   1 +
 Documentation/gitignore.txt        |  19 +++
 Makefile                           |   3 +
 attr.c                             |   4 +-
 dir.c                              |   4 +-
 t/t0003-attributes.sh              |  38 ++++++
 t/t3001-ls-files-others-exclude.sh |  19 +++
 t/t3070-wildmatch.sh               | 184 ++++++++++++++++++++++++++++
 test-wildmatch.c                   |  14 +++
 wildmatch.c                        | 245 +++++++++++++++++++++++++++++++++++++
 wildmatch.h                        |   3 +
 11 files changed, 532 insertions(+), 2 deletions(-)
 create mode 100755 t/t3070-wildmatch.sh
 create mode 100644 test-wildmatch.c
 create mode 100644 wildmatch.c
 create mode 100644 wildmatch.h

-- 
1.8.0.rc0.29.g1fdd78f

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

end of thread, other threads:[~2012-10-10  5:48 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-09  3:08 [PATCH 0/8] wildmatch take 3 Nguyễn Thái Ngọc Duy
2012-10-09  3:09 ` [PATCH 1/8] Import wildmatch from rsync Nguyễn Thái Ngọc Duy
2012-10-09  3:09 ` [PATCH 2/8] wildmatch: remove unnecessary functions Nguyễn Thái Ngọc Duy
2012-10-09  3:09 ` [PATCH 3/8] Integrate wildmatch to git Nguyễn Thái Ngọc Duy
2012-10-09  3:09 ` [PATCH 4/8] wildmatch: remove static variable force_lower_case Nguyễn Thái Ngọc Duy
2012-10-09 20:47   ` Junio C Hamano
2012-10-10  5:14     ` Nguyen Thai Ngoc Duy
2012-10-10  5:31       ` Junio C Hamano
2012-10-10  5:47         ` Nguyen Thai Ngoc Duy
2012-10-09  3:09 ` [PATCH 5/8] wildmatch: fix case-insensitive matching Nguyễn Thái Ngọc Duy
2012-10-09  3:09 ` [PATCH 6/8] wildmatch: adjust "**" behavior Nguyễn Thái Ngọc Duy
2012-10-09  3:09 ` [PATCH 7/8] wildmatch: make /**/ match zero or more directories Nguyễn Thái Ngọc Duy
2012-10-09  3:09 ` [PATCH 8/8] Support "**" wildcard in .gitignore and .gitattributes Nguyễn Thái Ngọc Duy
2012-10-09  7:57   ` Michael Haggerty
2012-10-10  5:40     ` Nguyen Thai Ngoc Duy

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).