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>
This commit is contained in:
committed by
Junio C Hamano
parent
a64215b6cd
commit
ac48adf488
16
dir.h
16
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,
|
||||
|
||||
Reference in New Issue
Block a user