Skip to content

Commit dd77d58

Browse files
newrengitster
authored andcommitted
git-compat-util.h: remove unneccessary include of wildmatch.h
The include of wildmatch.h in git-compat-util.h was added in cebcab1 (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 70a8fc9 (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 88e4e18 commit dd77d58

17 files changed

+16
-2
lines changed

apply.c

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include "entry.h"
3636
#include "setup.h"
3737
#include "symlinks.h"
38+
#include "wildmatch.h"
3839
#include "ws.h"
3940
#include "wrapper.h"
4041

builtin/describe.c

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "object-store.h"
2323
#include "list-objects.h"
2424
#include "commit-slab.h"
25+
#include "wildmatch.h"
2526

2627
#define MAX_TAGS (FLAG_BITS - 1)
2728

builtin/ls-remote.c

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "remote.h"
88
#include "refs.h"
99
#include "parse-options.h"
10+
#include "wildmatch.h"
1011

1112
static const char * const ls_remote_usage[] = {
1213
N_("git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n"

builtin/name-rev.c

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "hash-lookup.h"
1616
#include "commit-slab.h"
1717
#include "commit-graph.h"
18+
#include "wildmatch.h"
1819

1920
/*
2021
* One day. See the 'name a rev shortly after epoch' test in t6120 when

builtin/reflog.c

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "repository.h"
55
#include "revision.h"
66
#include "reachable.h"
7+
#include "wildmatch.h"
78
#include "worktree.h"
89
#include "reflog.h"
910
#include "parse-options.h"

builtin/replace.c

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "replace-object.h"
2525
#include "repository.h"
2626
#include "tag.h"
27+
#include "wildmatch.h"
2728

2829
static const char * const git_replace_usage[] = {
2930
N_("git replace [-f] <object> <replacement>"),

builtin/show-branch.c

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "dir.h"
1515
#include "commit-slab.h"
1616
#include "date.h"
17+
#include "wildmatch.h"
1718

1819
static const char* show_branch_usage[] = {
1920
N_("git show-branch [-a | --all] [-r | --remotes] [--topo-order | --date-order]\n"

config.c

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "setup.h"
3737
#include "strvec.h"
3838
#include "trace2.h"
39+
#include "wildmatch.h"
3940
#include "worktree.h"
4041
#include "ws.h"
4142
#include "wrapper.h"

diffcore-order.c

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "gettext.h"
66
#include "diff.h"
77
#include "diffcore.h"
8+
#include "wildmatch.h"
89

910
static char **order;
1011
static int order_cnt;

fmt-merge-msg.c

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "fmt-merge-msg.h"
1616
#include "commit-reach.h"
1717
#include "gpg-interface.h"
18+
#include "wildmatch.h"
1819

1920
static int use_branch_desc;
2021
static int suppress_dest_pattern_seen;

git-compat-util.h

-2
Original file line numberDiff line numberDiff line change
@@ -625,8 +625,6 @@ static inline int git_has_dir_sep(const char *path)
625625

626626
#include "compat/bswap.h"
627627

628-
#include "wildmatch.h"
629-
630628
struct strbuf;
631629

632630
/* General helper functions */

log-tree.c

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "range-diff.h"
2727
#include "strmap.h"
2828
#include "tree.h"
29+
#include "wildmatch.h"
2930
#include "write-or-die.h"
3031

3132
static struct decoration name_decoration = { "object names" };

pathspec.c

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "strvec.h"
1313
#include "symlinks.h"
1414
#include "quote.h"
15+
#include "wildmatch.h"
1516

1617
/*
1718
* Finds which of the given pathspecs match items in the index.

refs.c

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "sigchain.h"
3030
#include "date.h"
3131
#include "commit.h"
32+
#include "wildmatch.h"
3233
#include "wrapper.h"
3334

3435
/*

revision.c

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
#include "list-objects-filter-options.h"
4747
#include "resolve-undo.h"
4848
#include "parse-options.h"
49+
#include "wildmatch.h"
4950

5051
volatile show_early_output_fn_t show_early_output;
5152

t/helper/test-wildmatch.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "test-tool.h"
2+
#include "wildmatch.h"
23

34
int cmd__wildmatch(int argc, const char **argv)
45
{

trace2/tr2_cfg.c

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "trace2.h"
55
#include "trace2/tr2_cfg.h"
66
#include "trace2/tr2_sysenv.h"
7+
#include "wildmatch.h"
78

89
static struct strbuf **tr2_cfg_patterns;
910
static int tr2_cfg_count_patterns;

0 commit comments

Comments
 (0)