From de70bb46ae4ea91c26f6afdc210f37b8980b7a76 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Thu, 13 Jun 2019 15:27:22 +0200 Subject: 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). --- tests/describe/describe_helpers.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/describe/describe_helpers.c') 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); -- cgit v1.2.1