Skip to content

Bye bye fnmatch()

Nguyễn Thái Ngọc Duy git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3wildmatch: make dowild() take arbitrary flagswildmatch.c+6 -71 reply
2/3wildmatch: support "no FNM_PATHNAME" modedir.c t/t3070-wildmatch.sh test-wildmatch.c +1 more+39 -63 replies
3/3Convert all fnmatch() calls to wildmatch()builtin/apply.c builtin/branch.c builtin/describe.c +11 more+29 -162 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH/WIP 0/3] Bye bye fnmatch()

For those who have not followed, nd/wildmatch brings another fnmatch-like implementation which can nearly replace fnmatch. System fnmatch() seems to behave differently in some cases. It's better to stay away and use one implementation for all.

I just wanted to see how much work there may be if we go this way. It turns out not much. I haven't checked my dowild() changes carefully. I may have left a bug in '[]' code. There are some minor issues I like dependency on FNM_* macros or wildmatch.h should be incorporated back to git-compat-util.h. But the test suite passes for me. So it's promising.

Nguyễn Thái Ngọc Duy (3):
wildmatch: make dowild() take arbitrary flags
wildmatch: support "no FNM_PATHNAME" mode
Convert all fnmatch() calls to wildmatch()

 builtin/apply.c        |  3 ++-
 builtin/branch.c       |  3 ++-
 builtin/describe.c     |  3 ++-
 builtin/for-each-ref.c |  3 ++-
 builtin/ls-remote.c    |  3 ++-
 builtin/name-rev.c     |  3 ++-
 builtin/reflog.c       |  3 ++-
 builtin/replace.c      |  3 ++-
 builtin/show-branch.c  |  3 ++-
 builtin/tag.c          |  3 ++-
 diffcore-order.c       |  3 ++-
 dir.c                  |  6 +++---
 refs.c                 |  3 ++-
 t/t3070-wildmatch.sh   | 27 +++++++++++++++++++++++++++
 test-wildmatch.c       |  4 +++-
 tree-walk.c            |  5 +++--
 wildmatch.c            | 25 ++++++++++++++-----------
 17 files changed, 74 insertions(+), 29 deletions(-)
Signature · 1 line
1.8.0.rc2.23.g1fb49df