diff options
author | Patrick Steinhardt <ps@pks.im> | 2019-06-13 15:27:22 +0200 |
---|---|---|
committer | Patrick Steinhardt <ps@pks.im> | 2019-06-15 09:34:21 +0200 |
commit | de70bb46ae4ea91c26f6afdc210f37b8980b7a76 (patch) | |
tree | 6f650a4b546924ef65dd9c8f9ef6302658312930 /tests/describe/describe_helpers.c | |
parent | 451df7930db432e7b251bbd0fe2862fe96424ae9 (diff) | |
download | libgit2-de70bb46ae4ea91c26f6afdc210f37b8980b7a76.tar.gz |
global: convert trivial `fnmatch` users to use `wildcard`
Upstream git.git has converted its codebase to use wildcard in
favor of fnmatch in commit 70a8fc999d (stop using fnmatch (either
native or compat), 2014-02-15). To keep our own regex-matching in
line with what git does, convert all trivial instances of
`fnmatch` usage to use `wildcard`, instead. Trivial usage is
defined to be use of `fnmatch` with either no flags or flags that
have a 1:1 equivalent in wildmatch (PATHNAME, IGNORECASE).
Diffstat (limited to 'tests/describe/describe_helpers.c')
-rw-r--r-- | tests/describe/describe_helpers.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/describe/describe_helpers.c b/tests/describe/describe_helpers.c index e8e887c97..80217dcf0 100644 --- a/tests/describe/describe_helpers.c +++ b/tests/describe/describe_helpers.c @@ -1,6 +1,6 @@ #include "describe_helpers.h" -#include "fnmatch.h" +#include "wildmatch.h" void assert_describe( const char *expected_output, @@ -18,7 +18,7 @@ void assert_describe( cl_git_pass(git_describe_commit(&result, object, opts)); cl_git_pass(git_describe_format(&label, result, fmt_opts)); - cl_must_pass(p_fnmatch(expected_output, git_buf_cstr(&label), 0)); + cl_must_pass(wildmatch(expected_output, git_buf_cstr(&label), 0)); git_describe_result_free(result); git_object_free(object); @@ -37,7 +37,7 @@ void assert_describe_workdir( cl_git_pass(git_describe_workdir(&result, repo, opts)); cl_git_pass(git_describe_format(&label, result, fmt_opts)); - cl_must_pass(p_fnmatch(expected_output, git_buf_cstr(&label), 0)); + cl_must_pass(wildmatch(expected_output, git_buf_cstr(&label), 0)); git_describe_result_free(result); git_buf_dispose(&label); |