From bab8d28e774c255a326ad5592af6351e4925efcb Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 12 Dec 2011 19:49:59 -0500 Subject: connect.c: drop path_match function This function was used for comparing local and remote ref names during fetch (which makes it a candidate for "most confusingly named function of the year"). It no longer has any callers, so let's get rid of it. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- connect.c | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'connect.c') diff --git a/connect.c b/connect.c index 48df90bfe..2a0a0401a 100644 --- a/connect.c +++ b/connect.c @@ -105,27 +105,6 @@ int server_supports(const char *feature) strstr(server_capabilities, feature) != NULL; } -int path_match(const char *path, int nr, char **match) -{ - int i; - int pathlen = strlen(path); - - for (i = 0; i < nr; i++) { - char *s = match[i]; - int len = strlen(s); - - if (!len || len > pathlen) - continue; - if (memcmp(path + pathlen - len, s, len)) - continue; - if (pathlen > len && path[pathlen - len - 1] != '/') - continue; - *s = 0; - return (i + 1); - } - return 0; -} - enum protocol { PROTO_LOCAL = 1, PROTO_SSH, -- cgit v1.2.1