diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2014-01-24 20:40:28 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-02-24 14:36:52 -0800 |
commit | 429bb40abdb5b42ffdde5b1a58f9a37da723d179 (patch) | |
tree | 62442107904393fa427b89bffc451dff3520c693 /dir.h | |
parent | Merge branch 'nd/negative-pathspec' (diff) | |
download | tgif-429bb40abdb5b42ffdde5b1a58f9a37da723d179.tar.xz |
pathspec: convert some match_pathspec_depth() to ce_path_match()
This helps reduce the number of match_pathspec_depth() call sites and
show how match_pathspec_depth() is used.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.h')
-rw-r--r-- | dir.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -205,4 +205,11 @@ extern int git_fnmatch(const struct pathspec_item *item, const char *pattern, const char *string, int prefix); +static inline int ce_path_match(const struct cache_entry *ce, + const struct pathspec *pathspec, + char *seen) +{ + return match_pathspec_depth(pathspec, ce->name, ce_namelen(ce), 0, seen); +} + #endif |