diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-12-28 11:32:36 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-12-28 11:32:36 -0800 |
commit | 7a5638a1597da222dde484074392223d8daebd15 (patch) | |
tree | 66221490fd990d15dbbf3f19b9095004e025ff04 /connect.c | |
parent | 2cb1ff9ac35ff043e377f78e36a57422a6846485 (diff) | |
parent | bab8d28e774c255a326ad5592af6351e4925efcb (diff) | |
download | git-7a5638a1597da222dde484074392223d8daebd15.tar.gz git-7a5638a1597da222dde484074392223d8daebd15.tar.xz |
Merge branch 'jk/fetch-no-tail-match-refs' into maint
* jk/fetch-no-tail-match-refs:
connect.c: drop path_match function
fetch-pack: match refs exactly
t5500: give fully-qualified refs to fetch-pack
drop "match" parameter from get_remote_heads
Diffstat (limited to 'connect.c')
-rw-r--r-- | connect.c | 24 |
1 files changed, 0 insertions, 24 deletions
@@ -53,7 +53,6 @@ static void add_extra_have(struct extra_have_objects *extra, unsigned char *sha1 * Read all the refs from the other end */ struct ref **get_remote_heads(int in, struct ref **list, - int nr_match, char **match, unsigned int flags, struct extra_have_objects *extra_have) { @@ -92,8 +91,6 @@ struct ref **get_remote_heads(int in, struct ref **list, if (!check_ref(name, name_len, flags)) continue; - if (nr_match && !path_match(name, nr_match, match)) - continue; ref = alloc_ref(buffer + 41); hashcpy(ref->old_sha1, old_sha1); *list = ref; @@ -108,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, |