summaryrefslogtreecommitdiff
path: root/dir.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-09-06 12:32:30 -0700
committerJunio C Hamano <gitster@pobox.com>2011-09-06 12:54:19 -0700
commit4a085b16f430bcfe1b6e2e84e7a569f4e191e906 (patch)
tree3f6942e4b822e86aaf5cbb36597189f097761e51 /dir.h
parent5879f5684cfe8a38326b4ffd078f96e35c68e640 (diff)
downloadgit-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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/dir.h b/dir.h
index 433b5b4cd4..467d197984 100644
--- a/dir.h
+++ b/dir.h
@@ -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,