From ffb226fb6e6ee31c0130ee50797003afc485f340 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Wed, 16 Mar 2022 02:05:18 +0100 Subject: [PATCH] wildmatch from git-compat-util --- apply.c | 1 + builtin/describe.c | 1 + builtin/ls-remote.c | 1 + builtin/name-rev.c | 1 + builtin/reflog.c | 1 + builtin/replace.c | 1 + builtin/reset.c | 1 + builtin/show-branch.c | 1 + config.c | 1 + diffcore-order.c | 1 + fmt-merge-msg.c | 1 + git-compat-util.h | 2 -- log-tree.c | 1 + refs.c | 1 + revision.c | 1 + t/helper/test-wildmatch.c | 1 + trace2/tr2_cfg.c | 1 + 17 files changed, 16 insertions(+), 2 deletions(-) diff --git a/apply.c b/apply.c index 01f91816428898..d7e589e219acaa 100644 --- a/apply.c +++ b/apply.c @@ -22,6 +22,7 @@ #include "rerere.h" #include "apply.h" #include "entry.h" +#include "wildmatch.h" struct gitdiff_data { struct strbuf *root; diff --git a/builtin/describe.c b/builtin/describe.c index 42159cd26bd807..d6f091f2dfd5c5 100644 --- a/builtin/describe.c +++ b/builtin/describe.c @@ -17,6 +17,7 @@ #include "object-store.h" #include "list-objects.h" #include "commit-slab.h" +#include "wildmatch.h" #define MAX_TAGS (FLAG_BITS - 1) diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c index d856085e9414a2..a53f1104d22742 100644 --- a/builtin/ls-remote.c +++ b/builtin/ls-remote.c @@ -4,6 +4,7 @@ #include "ref-filter.h" #include "remote.h" #include "refs.h" +#include "wildmatch.h" static const char * const ls_remote_usage[] = { N_("git ls-remote [--heads] [--tags] [--refs] [--upload-pack=]\n" diff --git a/builtin/name-rev.c b/builtin/name-rev.c index 929591269ddf7f..22961edac3a6df 100644 --- a/builtin/name-rev.c +++ b/builtin/name-rev.c @@ -9,6 +9,7 @@ #include "prio-queue.h" #include "hash-lookup.h" #include "commit-slab.h" +#include "wildmatch.h" /* * One day. See the 'name a rev shortly after epoch' test in t6120 when diff --git a/builtin/reflog.c b/builtin/reflog.c index 016466852f178e..e23852b22ccaf6 100644 --- a/builtin/reflog.c +++ b/builtin/reflog.c @@ -11,6 +11,7 @@ #include "revision.h" #include "reachable.h" #include "worktree.h" +#include "wildmatch.h" static const char reflog_exists_usage[] = N_("git reflog exists "); diff --git a/builtin/replace.c b/builtin/replace.c index ac92337c0ec55e..c66a348b965c05 100644 --- a/builtin/replace.c +++ b/builtin/replace.c @@ -17,6 +17,7 @@ #include "object-store.h" #include "repository.h" #include "tag.h" +#include "wildmatch.h" static const char * const git_replace_usage[] = { N_("git replace [-f] "), diff --git a/builtin/reset.c b/builtin/reset.c index 6cb2d695eb1b47..9dbdbbff25588c 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -27,6 +27,7 @@ #include "submodule.h" #include "submodule-config.h" #include "dir.h" +#include "wildmatch.h" #define REFRESH_INDEX_DELAY_WARNING_IN_MS (2 * 1000) diff --git a/builtin/show-branch.c b/builtin/show-branch.c index 330b0553b9d72d..7a2d103f528e4c 100644 --- a/builtin/show-branch.c +++ b/builtin/show-branch.c @@ -9,6 +9,7 @@ #include "dir.h" #include "commit-slab.h" #include "date.h" +#include "wildmatch.h" static const char* show_branch_usage[] = { N_("git show-branch [-a | --all] [-r | --remotes] [--topo-order | --date-order]\n" diff --git a/config.c b/config.c index 97fa2d25e4350c..8bd9e8339c051f 100644 --- a/config.c +++ b/config.c @@ -24,6 +24,7 @@ #include "color.h" #include "refs.h" #include "worktree.h" +#include "wildmatch.h" struct config_source { struct config_source *prev; diff --git a/diffcore-order.c b/diffcore-order.c index 19e73311f9cd83..58fb10b1e3e3e9 100644 --- a/diffcore-order.c +++ b/diffcore-order.c @@ -4,6 +4,7 @@ #include "cache.h" #include "diff.h" #include "diffcore.h" +#include "wildmatch.h" static char **order; static int order_cnt; diff --git a/fmt-merge-msg.c b/fmt-merge-msg.c index baca57d5b64c9f..1efe1d03daf8d4 100644 --- a/fmt-merge-msg.c +++ b/fmt-merge-msg.c @@ -10,6 +10,7 @@ #include "fmt-merge-msg.h" #include "commit-reach.h" #include "gpg-interface.h" +#include "wildmatch.h" static int use_branch_desc; static int suppress_dest_pattern_seen; diff --git a/git-compat-util.h b/git-compat-util.h index e50e2fafaec9d7..4943eecd9f7388 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -505,8 +505,6 @@ static inline int git_has_dir_sep(const char *path) #include "compat/bswap.h" -#include "wildmatch.h" - struct strbuf; /* General helper functions */ diff --git a/log-tree.c b/log-tree.c index 25165e2a915e03..b58faa69458eeb 100644 --- a/log-tree.c +++ b/log-tree.c @@ -20,6 +20,7 @@ #include "help.h" #include "range-diff.h" #include "strmap.h" +#include "wildmatch.h" static struct decoration name_decoration = { "object names" }; static int decoration_loaded; diff --git a/refs.c b/refs.c index 69b882d2396cf0..cc9d991c8c9414 100644 --- a/refs.c +++ b/refs.c @@ -21,6 +21,7 @@ #include "repository.h" #include "sigchain.h" #include "date.h" +#include "wildmatch.h" /* * List of all available backends diff --git a/revision.c b/revision.c index 2bb913f2f3f957..5cc2a04f195c2e 100644 --- a/revision.c +++ b/revision.c @@ -32,6 +32,7 @@ #include "utf8.h" #include "bloom.h" #include "json-writer.h" +#include "wildmatch.h" volatile show_early_output_fn_t show_early_output; diff --git a/t/helper/test-wildmatch.c b/t/helper/test-wildmatch.c index 2c103d1824cfc7..d8a5c93188b3c7 100644 --- a/t/helper/test-wildmatch.c +++ b/t/helper/test-wildmatch.c @@ -1,5 +1,6 @@ #include "test-tool.h" #include "cache.h" +#include "wildmatch.h" int cmd__wildmatch(int argc, const char **argv) { diff --git a/trace2/tr2_cfg.c b/trace2/tr2_cfg.c index ec9ac1a6efd3f6..67a32626764486 100644 --- a/trace2/tr2_cfg.c +++ b/trace2/tr2_cfg.c @@ -2,6 +2,7 @@ #include "config.h" #include "trace2/tr2_cfg.h" #include "trace2/tr2_sysenv.h" +#include "wildmatch.h" static struct strbuf **tr2_cfg_patterns; static int tr2_cfg_count_patterns;