summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2019-06-13 15:20:23 +0200
committerPatrick Steinhardt <ps@pks.im>2019-06-15 09:34:21 +0200
commit451df7930db432e7b251bbd0fe2862fe96424ae9 (patch)
treefa37153666ddbc396b20cefac7d32e2de41145f8
parenta9f576291ac3c2790124809b2390b3f2915aaa44 (diff)
downloadlibgit2-451df7930db432e7b251bbd0fe2862fe96424ae9.tar.gz
posix: remove implicit include of "fnmatch.h"
We're about to phase out our bundled fnmatch implementation as git.git has moved to wildmatch long ago in 2014. To make it easier to spot which files are stilll using fnmatch, remove the implicit "fnmatch.h" include in "posix.h" and instead include it explicitly.
-rw-r--r--src/attr_file.c1
-rw-r--r--src/config_file.c1
-rw-r--r--src/describe.c3
-rw-r--r--src/pathspec.c1
-rw-r--r--src/posix.h1
-rw-r--r--src/refdb_fs.c1
-rw-r--r--src/refspec.c2
-rw-r--r--src/status.c1
-rw-r--r--src/tag.c1
-rw-r--r--tests/describe/describe_helpers.c2
10 files changed, 11 insertions, 3 deletions
diff --git a/src/attr_file.c b/src/attr_file.c
index f01a743d2..a2959aefd 100644
--- a/src/attr_file.c
+++ b/src/attr_file.c
@@ -15,6 +15,7 @@
#include "git2/tree.h"
#include "blob.h"
#include "index.h"
+#include "fnmatch.h"
#include <ctype.h>
static void attr_file_free(git_attr_file *file)
diff --git a/src/config_file.c b/src/config_file.c
index 716205851..958a1638c 100644
--- a/src/config_file.c
+++ b/src/config_file.c
@@ -18,6 +18,7 @@
#include "array.h"
#include "config_parse.h"
#include "config_entries.h"
+#include "fnmatch.h"
#include <ctype.h>
#include <sys/types.h>
diff --git a/src/describe.c b/src/describe.c
index 7f715193d..1354290a9 100644
--- a/src/describe.c
+++ b/src/describe.c
@@ -14,12 +14,13 @@
#include "commit.h"
#include "commit_list.h"
+#include "fnmatch.h"
#include "oidmap.h"
#include "refs.h"
+#include "repository.h"
#include "revwalk.h"
#include "tag.h"
#include "vector.h"
-#include "repository.h"
/* Ported from https://github.com/git/git/blob/89dde7882f71f846ccd0359756d27bebc31108de/builtin/describe.c */
diff --git a/src/pathspec.c b/src/pathspec.c
index 07795f256..80144c741 100644
--- a/src/pathspec.c
+++ b/src/pathspec.c
@@ -16,6 +16,7 @@
#include "index.h"
#include "bitvec.h"
#include "diff.h"
+#include "fnmatch.h"
/* what is the common non-wildcard prefix for all items in the pathspec */
char *git_pathspec_prefix(const git_strarray *pathspec)
diff --git a/src/posix.h b/src/posix.h
index 0119b6bb7..229666668 100644
--- a/src/posix.h
+++ b/src/posix.h
@@ -11,7 +11,6 @@
#include <fcntl.h>
#include <time.h>
-#include "fnmatch.h"
/* stat: file mode type testing macros */
#ifndef S_IFGITLINK
diff --git a/src/refdb_fs.c b/src/refdb_fs.c
index c8533e69f..22b08a12d 100644
--- a/src/refdb_fs.c
+++ b/src/refdb_fs.c
@@ -18,6 +18,7 @@
#include "iterator.h"
#include "sortedcache.h"
#include "signature.h"
+#include "fnmatch.h"
#include <git2/tag.h>
#include <git2/object.h>
diff --git a/src/refspec.c b/src/refspec.c
index dab053634..30e618fff 100644
--- a/src/refspec.c
+++ b/src/refspec.c
@@ -10,7 +10,7 @@
#include "git2/errors.h"
#include "util.h"
-#include "posix.h"
+#include "fnmatch.h"
#include "refs.h"
#include "vector.h"
diff --git a/src/status.c b/src/status.c
index 8d3185f0e..84c4b66c6 100644
--- a/src/status.c
+++ b/src/status.c
@@ -16,6 +16,7 @@
#include "repository.h"
#include "ignore.h"
#include "index.h"
+#include "fnmatch.h"
#include "git2/diff.h"
#include "diff.h"
diff --git a/src/tag.c b/src/tag.c
index b4a5015df..e39a79c89 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -8,6 +8,7 @@
#include "tag.h"
#include "commit.h"
+#include "fnmatch.h"
#include "signature.h"
#include "message.h"
#include "git2/object.h"
diff --git a/tests/describe/describe_helpers.c b/tests/describe/describe_helpers.c
index 2e6ad539e..e8e887c97 100644
--- a/tests/describe/describe_helpers.c
+++ b/tests/describe/describe_helpers.c
@@ -1,5 +1,7 @@
#include "describe_helpers.h"
+#include "fnmatch.h"
+
void assert_describe(
const char *expected_output,
const char *revparse_spec,