X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin%2Ffetch-pack.c;h=6207ecd2982761a47474b57cc945a2fc66ed84a1;hb=dbdc07fcbe3a951df8a3869b42edb6fffd466486;hp=c6bc8eb0aa6f5a6bc35c69e7893118a17813db7d;hpb=5ae0f68160a189fafc2cf50b9a35aacc73cf8209;p=git.git diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c index c6bc8eb0a..6207ecd29 100644 --- a/builtin/fetch-pack.c +++ b/builtin/fetch-pack.c @@ -556,11 +556,16 @@ static void filter_refs(struct ref **refs, int nr_match, char **match) continue; } else { - int order = path_match(ref->name, nr_match, match); - if (order) { - return_refs[order-1] = ref; - continue; /* we will link it later */ + int i; + for (i = 0; i < nr_match; i++) { + if (!strcmp(ref->name, match[i])) { + match[i][0] = '\0'; + return_refs[i] = ref; + break; + } } + if (i < nr_match) + continue; /* we will link it later */ } free(ref); } @@ -976,7 +981,7 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix) args.verbose ? CONNECT_VERBOSE : 0); } - get_remote_heads(fd[0], &ref, 0, NULL, 0, NULL); + get_remote_heads(fd[0], &ref, 0, NULL); ref = fetch_pack(&args, fd, conn, ref, dest, nr_heads, heads, pack_lockfile_ptr);