Skip to content

Support matching "**" in .gitattributes and .gitignore

Nguyễn Thái Ngọc Duy git 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 6 repliesIn review
  2. v15 patches 16 repliesSuperseded

Changes in v2 from the cover letter

- Correct commit sha-1 in the 1/5 to the last GPL-2 rsync commit. State it is pristine import. Move wildmatch.[ch] to top dir.
- Add tests to 5/5 (I forgot to test that the integration should run well, in addition to wildmatch() working in general)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5Import wildmatch from rsynct/t3070-wildmatch/wildtest.txt test-wildmatch.c wildmatch.c +1 more+761 -00 replies
2/5compat/wildmatch: remove static variable force_lower_casewildmatch.c+7 -100 replies
3/5compat/wildmatch: fix case-insensitive matchingwildmatch.c+2 -00 replies
4/5Integrate wildmatch to git.gitignore Makefile t/t3070-wildmatch.sh +2 more+48 -25 replies
5/5Support "**" in .gitignore and .gitattributes patterns using wildmatch()Documentation/gitignore.txt attr.c dir.c +2 more+38 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/5] Support matching "**" in .gitattributes and .gitignore

Changes in v2:

- Correct commit sha-1 in the 1/5 to the last GPL-2 rsync commit. State it is pristine import. Move wildmatch.[ch] to top dir.
- Add tests to 5/5 (I forgot to test that the integration should run well, in addition to wildmatch() working in general)

Note that there might be a regression because wildmatch() does not care about LC_CTYPE when dealing with character classes, while libc's fnmatch might. But it's probably not worth bothering about because we match against path names, which do not necessarily follow LC_TYPE but the file system's encoding.

Nguyễn Thái Ngọc Duy (5):
Import wildmatch from rsync
compat/wildmatch: remove static variable force_lower_case compat/wildmatch: fix case-insensitive matching Integrate wildmatch to git
Support "**" in .gitignore and .gitattributes patterns using
wildmatch()

 .gitignore                         |   1 +
 Documentation/gitignore.txt        |   3 +
 Makefile                           |   6 +
 attr.c                             |   4 +-
 dir.c                              |   5 +-
 t/t0003-attributes.sh              |  17 ++
 t/t3001-ls-files-others-exclude.sh |  11 ++
 t/t3070-wildmatch.sh               |  27 +++
 t/t3070-wildmatch/wildtest.txt     | 165 ++++++++++++++++
 test-wildmatch.c                   | 228 +++++++++++++++++++++++
 wildmatch.c                        | 373 +++++++++++++++++++++++++++++++++++++
 wildmatch.h                        |   6 +
 12 files changed, 844 insertions(+), 2 deletions(-)
 create mode 100755 t/t3070-wildmatch.sh
 create mode 100644 t/t3070-wildmatch/wildtest.txt
 create mode 100644 test-wildmatch.c
 create mode 100644 wildmatch.c
 create mode 100644 wildmatch.h
Signature · 1 line
1.7.12.403.gce5cf6f.dirty