]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git-compat-util.h: remove unneccessary include of wildmatch.h
authorElijah Newren <newren@gmail.com>
Tue, 16 May 2023 06:34:03 +0000 (06:34 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 21 Jun 2023 20:39:54 +0000 (13:39 -0700)
The include of wildmatch.h in git-compat-util.h was added in cebcab189aa
(Makefile: add USE_WILDMATCH to use wildmatch as fnmatch, 2013-01-01) as
a way to be able to compile-time force any calls to fnmatch() to instead
invoke wildmatch().  The defines and inline function were removed in
70a8fc999d9 (stop using fnmatch (either native or compat), 2014-02-15),
and this include in git-compat-util.h has been unnecessary ever since.

Remove the include from git-compat-util.h, but add it to the .c files
that had omitted the direct #include they needed.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
17 files changed:
apply.c
builtin/describe.c
builtin/ls-remote.c
builtin/name-rev.c
builtin/reflog.c
builtin/replace.c
builtin/show-branch.c
config.c
diffcore-order.c
fmt-merge-msg.c
git-compat-util.h
log-tree.c
pathspec.c
refs.c
revision.c
t/helper/test-wildmatch.c
trace2/tr2_cfg.c

diff --git a/apply.c b/apply.c
index be58dc08d22d31fbde5bdb571071244b9ce29250..801f2bcc99c2b009b2f90c568bb5df865272cd2f 100644 (file)
--- a/apply.c
+++ b/apply.c
@@ -35,6 +35,7 @@
 #include "entry.h"
 #include "setup.h"
 #include "symlinks.h"
+#include "wildmatch.h"
 #include "ws.h"
 #include "wrapper.h"
 
index 508e8df00ef0a355f30d1e99e359bb72c0aabe00..eb19ab0bbbeb1a392f464fd9aac42f4c6716f7d0 100644 (file)
@@ -22,6 +22,7 @@
 #include "object-store.h"
 #include "list-objects.h"
 #include "commit-slab.h"
+#include "wildmatch.h"
 
 #define MAX_TAGS       (FLAG_BITS - 1)
 
index a0aadc9b8ff6fbc22af439ef6fbd57203dd295e0..fc765754305ed7a3f8a2efdcd604dd29c8b3b502 100644 (file)
@@ -7,6 +7,7 @@
 #include "remote.h"
 #include "refs.h"
 #include "parse-options.h"
+#include "wildmatch.h"
 
 static const char * const ls_remote_usage[] = {
        N_("git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n"
index 4d15a23fc4d52f6360708b07a7d55fa3e206d158..c3b722b36fcc8935b068e8a7239823bd0d03c333 100644 (file)
@@ -15,6 +15,7 @@
 #include "hash-lookup.h"
 #include "commit-slab.h"
 #include "commit-graph.h"
+#include "wildmatch.h"
 
 /*
  * One day.  See the 'name a rev shortly after epoch' test in t6120 when
index fc21774880800b6647e922fc8ea3e9889ac1d17f..79b4ff04aae346508a68bee49406f3bf5367a10f 100644 (file)
@@ -4,6 +4,7 @@
 #include "repository.h"
 #include "revision.h"
 #include "reachable.h"
+#include "wildmatch.h"
 #include "worktree.h"
 #include "reflog.h"
 #include "parse-options.h"
index 6b266a66d30fcf6592f284a2e021cbad82c10eef..a2f57a56b3e986b1c928cabe031e4335c3b48d4f 100644 (file)
@@ -24,6 +24,7 @@
 #include "replace-object.h"
 #include "repository.h"
 #include "tag.h"
+#include "wildmatch.h"
 
 static const char * const git_replace_usage[] = {
        N_("git replace [-f] <object> <replacement>"),
index cd215f89af891a06743dcbd3c034c3bba294f558..a203f13cb0dae744b15287f7cb61174f48bf5c62 100644 (file)
@@ -14,6 +14,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"
index 8afa266054411e6da1636c4bfda2d64dc5ea2d89..27ae207280ba5de0bef0d80219bfa9853d4b5c37 100644 (file)
--- a/config.c
+++ b/config.c
@@ -36,6 +36,7 @@
 #include "setup.h"
 #include "strvec.h"
 #include "trace2.h"
+#include "wildmatch.h"
 #include "worktree.h"
 #include "ws.h"
 #include "wrapper.h"
index 57ccab284645693322301e59b07f6fceb62d6224..e7d20ebd2d1b45b073ac2825b9371986d305ee29 100644 (file)
@@ -5,6 +5,7 @@
 #include "gettext.h"
 #include "diff.h"
 #include "diffcore.h"
+#include "wildmatch.h"
 
 static char **order;
 static int order_cnt;
index 5af0d4715ba22f2f1629880ec530a0752398e716..f096b1ef549d8ebde27759135dfabb4b0120a158 100644 (file)
@@ -15,6 +15,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;
index 5b2b99c17c564c5a5904442416e5d7d13f7b0568..1889da7986e3bd8e593713a8be01c88122d6af11 100644 (file)
@@ -625,8 +625,6 @@ static inline int git_has_dir_sep(const char *path)
 
 #include "compat/bswap.h"
 
-#include "wildmatch.h"
-
 struct strbuf;
 
 /* General helper functions */
index 07d0b47b168785255c64c0aec333136f108f5915..60b61597c4249373cff6f2c73c09491656cffbd6 100644 (file)
@@ -26,6 +26,7 @@
 #include "range-diff.h"
 #include "strmap.h"
 #include "tree.h"
+#include "wildmatch.h"
 #include "write-or-die.h"
 
 static struct decoration name_decoration = { "object names" };
index 8932b05a264b9d325a5c522f086131a60baa2c3e..3a3a5724c44bcb7b53d10ddce6f0f9f9f397512b 100644 (file)
@@ -12,6 +12,7 @@
 #include "strvec.h"
 #include "symlinks.h"
 #include "quote.h"
+#include "wildmatch.h"
 
 /*
  * Finds which of the given pathspecs match items in the index.
diff --git a/refs.c b/refs.c
index 6d657e3bb46a52b34e9fe2c0c72c0f5340039c36..8b192e4cb46c871c6287d46bb30b8613a5f0d762 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -29,6 +29,7 @@
 #include "sigchain.h"
 #include "date.h"
 #include "commit.h"
+#include "wildmatch.h"
 #include "wrapper.h"
 
 /*
index 66a1fece0df29b054fa4873380496c1147465ad2..d4b4b34fd801923fbd863df73ffa1c7cdf4343fb 100644 (file)
@@ -46,6 +46,7 @@
 #include "list-objects-filter-options.h"
 #include "resolve-undo.h"
 #include "parse-options.h"
+#include "wildmatch.h"
 
 volatile show_early_output_fn_t show_early_output;
 
index a95bb4da9b174e547b41eb2c57dee9fd9273c5ea..b4ff5f986ae00b099ead5d75e5e8b196de88f67c 100644 (file)
@@ -1,4 +1,5 @@
 #include "test-tool.h"
+#include "wildmatch.h"
 
 int cmd__wildmatch(int argc, const char **argv)
 {
index 78cfc15d52dd5800ea5bd610e5db7b0e73b4f8af..db817a80c533d34ee5898a3b23fb6f6f7f7cf213 100644 (file)
@@ -4,6 +4,7 @@
 #include "trace2.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;