diff options
author | Jeff King <peff@peff.net> | 2011-12-12 19:49:59 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-12-13 10:18:12 -0800 |
commit | bab8d28e774c255a326ad5592af6351e4925efcb (patch) | |
tree | c9440cb225ba86b0221050b4ff7b0600430fb34f /connect.c | |
parent | 1e7ba0f9caf1993491aa4c5cbd796cd31cb0f4af (diff) | |
download | git-bab8d28e774c255a326ad5592af6351e4925efcb.tar.gz |
connect.c: drop path_match functionjk/fetch-no-tail-match-refs
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'connect.c')
-rw-r--r-- | connect.c | 21 |
1 files changed, 0 insertions, 21 deletions
@@ -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, |