X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=dir.h;h=dd6947e1d46098732ff1d8c3f23087c1e7163fe9;hb=f0b4fd47074d8cf3f9db9c444c8e1e125e0cc517;hp=72a764ed84828e4a6336d2880f2167fbc9d3143a;hpb=ed36a48e6d246f4f60d44b27e8c1e660151cd0b4;p=git.git diff --git a/dir.h b/dir.h index 72a764ed8..dd6947e1d 100644 --- a/dir.h +++ b/dir.h @@ -64,7 +64,12 @@ struct dir_struct { #define MATCHED_RECURSIVELY 1 #define MATCHED_FNMATCH 2 #define MATCHED_EXACTLY 3 +extern char *common_prefix(const char **pathspec); extern int match_pathspec(const char **pathspec, const char *name, int namelen, int prefix, char *seen); +extern int match_pathspec_depth(const struct pathspec *pathspec, + const char *name, int namelen, + int prefix, char *seen); +extern int within_depth(const char *name, int namelen, int depth, int max_depth); extern int fill_directory(struct dir_struct *dir, const char **pathspec); extern int read_directory(struct dir_struct *, const char *path, int len, const char **pathspec); @@ -81,8 +86,8 @@ extern void add_exclude(const char *string, const char *base, extern void free_excludes(struct exclude_list *el); extern int file_exists(const char *); -extern char *get_relative_cwd(char *buffer, int size, const char *dir); extern int is_inside_dir(const char *dir); +extern int dir_inside_of(const char *subdir, const char *dir); static inline int is_dot_or_dotdot(const char *name) {