From 4a085b16f430bcfe1b6e2e84e7a569f4e191e906 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 6 Sep 2011 12:32:30 -0700 Subject: 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 --- dir.h | 1 + 1 file changed, 1 insertion(+) (limited to 'dir.h') 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, -- cgit v1.2.1