summaryrefslogtreecommitdiff
path: root/dir.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2014-01-24 13:40:30 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-02-24 22:37:14 (GMT)
commit854b09592ce9a497f56f35d973c4abe43af84cd1 (patch)
tree7710a0609602c4cb06b6b753da28e4d1518aff39 /dir.h
parentebb32893bad46bf5edae881552672a47dd2684b8 (diff)
downloadgit-854b09592ce9a497f56f35d973c4abe43af84cd1.zip
git-854b09592ce9a497f56f35d973c4abe43af84cd1.tar.gz
git-854b09592ce9a497f56f35d973c4abe43af84cd1.tar.bz2
pathspec: rename match_pathspec_depth() to match_pathspec()
A long time ago, for some reason I was not happy with match_pathspec(). I created a better version, match_pathspec_depth() that was suppose to replace match_pathspec() eventually. match_pathspec() has finally been gone since 6 months ago. Use the shorter name for match_pathspec_depth(). 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.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/dir.h b/dir.h
index 65f54b6..c31ed9a 100644
--- a/dir.h
+++ b/dir.h
@@ -132,9 +132,9 @@ struct dir_struct {
extern int simple_length(const char *match);
extern int no_wildcard(const char *string);
extern char *common_prefix(const struct pathspec *pathspec);
-extern int match_pathspec_depth(const struct pathspec *pathspec,
- const char *name, int namelen,
- int prefix, char *seen);
+extern int match_pathspec(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 struct pathspec *pathspec);
@@ -209,14 +209,14 @@ 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);
+ return match_pathspec(pathspec, ce->name, ce_namelen(ce), 0, seen);
}
static inline int dir_path_match(const struct dir_entry *ent,
const struct pathspec *pathspec,
int prefix, char *seen)
{
- return match_pathspec_depth(pathspec, ent->name, ent->len, prefix, seen);
+ return match_pathspec(pathspec, ent->name, ent->len, prefix, seen);
}
#endif