ls-remote: pass ref prefixes when requesting a remote's refs
[gitweb.git] / builtin / fetch.c
index e656746ab9afd071c3dff49b6b04c878f11996fa..850382f5596cf78bfa2cf8ccd66fcf8ec7f72e0d 100644 (file)
@@ -250,7 +250,7 @@ static void find_non_local_tags(struct transport *transport,
        struct string_list_item *item = NULL;
 
        for_each_ref(add_existing, &existing_refs);
-       for (ref = transport_get_remote_refs(transport); ref; ref = ref->next) {
+       for (ref = transport_get_remote_refs(transport, NULL); ref; ref = ref->next) {
                if (!starts_with(ref->name, "refs/tags/"))
                        continue;
 
@@ -336,7 +336,7 @@ static struct ref *get_ref_map(struct transport *transport,
        /* opportunistically-updated references: */
        struct ref *orefs = NULL, **oref_tail = &orefs;
 
-       const struct ref *remote_refs = transport_get_remote_refs(transport);
+       const struct ref *remote_refs = transport_get_remote_refs(transport, NULL);
 
        if (refspec_count) {
                struct refspec *fetch_refspec;
@@ -1095,9 +1095,6 @@ static int do_fetch(struct transport *transport,
                        tags = TAGS_UNSET;
        }
 
-       if (!transport->get_refs_list || !transport->fetch)
-               die(_("Don't know how to fetch from %s"), transport->url);
-
        /* if not appending, truncate FETCH_HEAD */
        if (!append && !dry_run) {
                retcode = truncate_fetch_head();