Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/dir.h
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2023-02-24 03:09:31 +0300
committerJunio C Hamano <gitster@pobox.com>2023-02-24 04:25:29 +0300
commitac48adf488794417b1060b5ed2377a9fd4c33c17 (patch)
tree58d3b2d06a41d521ad5b50cfc872aa703a8e2d94 /dir.h
parenta64215b6cd5e67939187475c5b248dc5d13e3d60 (diff)
dir.h: refactor to no longer need to include cache.h
Moving a few functions around allows us to make dir.h no longer need to include cache.h. This commit is best viewed with: git log -1 -p --color-moved Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.h')
-rw-r--r--dir.h16
1 files changed, 2 insertions, 14 deletions
diff --git a/dir.h b/dir.h
index 8acfc04418..fc4386ae50 100644
--- a/dir.h
+++ b/dir.h
@@ -1,8 +1,9 @@
#ifndef DIR_H
#define DIR_H
-#include "cache.h"
#include "hashmap.h"
+#include "pathspec.h"
+#include "statinfo.h"
#include "strbuf.h"
/**
@@ -363,10 +364,6 @@ int count_slashes(const char *s);
int simple_length(const char *match);
int no_wildcard(const char *string);
char *common_prefix(const struct pathspec *pathspec);
-int match_pathspec(struct index_state *istate,
- const struct pathspec *pathspec,
- const char *name, int namelen,
- int prefix, char *seen, int is_dir);
int report_path_error(const char *ps_matched, const struct pathspec *pathspec);
int within_depth(const char *name, int namelen, int depth, int max_depth);
@@ -533,15 +530,6 @@ int submodule_path_match(struct index_state *istate,
const char *submodule_name,
char *seen);
-static inline int ce_path_match(struct index_state *istate,
- const struct cache_entry *ce,
- const struct pathspec *pathspec,
- char *seen)
-{
- return match_pathspec(istate, pathspec, ce->name, ce_namelen(ce), 0, seen,
- S_ISDIR(ce->ce_mode) || S_ISGITLINK(ce->ce_mode));
-}
-
static inline int dir_path_match(struct index_state *istate,
const struct dir_entry *ent,
const struct pathspec *pathspec,