diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-09-06 12:32:30 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-09-06 12:54:19 -0700 |
commit | 4a085b16f430bcfe1b6e2e84e7a569f4e191e906 (patch) | |
tree | 3f6942e4b822e86aaf5cbb36597189f097761e51 /dir.h | |
parent | 5879f5684cfe8a38326b4ffd078f96e35c68e640 (diff) | |
download | git-4a085b16f430bcfe1b6e2e84e7a569f4e191e906.tar.gz |
consolidate pathspec_prefix and common_prefix
The implementation from pathspec_prefix (slightly modified) replaces the
current common_prefix, because it also respects glob characters.
Based on a patch by Clemens Buchacher.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.h')
-rw-r--r-- | dir.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -64,6 +64,7 @@ struct dir_struct { #define MATCHED_RECURSIVELY 1 #define MATCHED_FNMATCH 2 #define MATCHED_EXACTLY 3 +extern size_t common_prefix_len(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, |