git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Dec 19, 2012, 13:08 UTC
Message-ID
<1355922488-20976-1-git-send-email-pclouds@gmail.com>

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(-)
-- 
1.8.0.rc2.23.g1fb49df
Next: Nguyễn Thái Ngọc Duy
Message 1 of 11 in “Bye bye fnmatch()”
  1. 0/3 Bye bye fnmatch()Nguyễn Thái Ngọc Duy, Dec 19, 2012
  2. 1/3 wildmatch: make dowild() take arbitrary flagsNguyễn Thái Ngọc Duy, Dec 19, 2012
  3. Junio C HamanoDec 19, 2012
  4. 2/3 wildmatch: support "no FNM_PATHNAME" modeNguyễn Thái Ngọc Duy, Dec 19, 2012
  5. Junio C HamanoDec 19, 2012
  6. Nguyen Thai Ngoc DuyDec 20, 2012
  7. Nguyen Thai Ngoc DuyDec 20, 2012
  8. 3/3 Convert all fnmatch() calls to wildmatch()Nguyễn Thái Ngọc Duy, Dec 19, 2012
  9. Junio C HamanoDec 19, 2012
  10. Nguyen Thai Ngoc DuyDec 20, 2012
  11. Nguyen Thai Ngoc DuyDec 19, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.