summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1e7ba0f)
raw | patch | inline | side by side (parent: 1e7ba0f)
author | Jeff King <peff@peff.net> | |
Tue, 13 Dec 2011 00:49:59 +0000 (19:49 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 13 Dec 2011 18:18:12 +0000 (10:18 -0800) |
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>
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>
cache.h | patch | blob | history | |
connect.c | patch | blob | history |
index 451960175cf33626d3c50dccdf05e1bb7aa65d07..79c612fc2f51a5adf059a7a9ec2b8e7882388faa 100644 (file)
--- a/cache.h
+++ b/cache.h
extern struct child_process *git_connect(int fd[2], const char *url, const char *prog, int flags);
extern int finish_connect(struct child_process *conn);
extern int git_connection_is_socket(struct child_process *conn);
-extern int path_match(const char *path, int nr, char **match);
struct extra_have_objects {
int nr, alloc;
unsigned char (*array)[20];
diff --git a/connect.c b/connect.c
index 48df90bfe56068109476ec62fb8209db20c4e8cf..2a0a0401af6e070125f1ae6d97004f4036af35f6 100644 (file)
--- a/connect.c
+++ b/connect.c
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,