refspec: convert valid_fetch_refspec to use parse_refspec
[gitweb.git] / transport-helper.c
index aecbc4a845c931efdb41414df4603d8fda5d09b7..b156a37e7d45d5f48dfb979b0e49acc7ebc87306 100644 (file)
@@ -11,6 +11,7 @@
 #include "sigchain.h"
 #include "argv-array.h"
 #include "refs.h"
+#include "refspec.h"
 #include "transport-internal.h"
 #include "protocol.h"
 
@@ -35,7 +36,7 @@ struct helper_data {
        char *export_marks;
        char *import_marks;
        /* These go from remote name (as in "list") to private name */
-       struct refspec *refspecs;
+       struct refspec_item *refspecs;
        int refspec_nr;
        /* Transport options for fetch-pack/send-pack (should one of
         * those be invoked).
@@ -692,6 +693,11 @@ static int fetch(struct transport *transport,
        if (data->transport_options.update_shallow)
                set_helper_option(transport, "update-shallow", "true");
 
+       if (data->transport_options.filter_options.choice)
+               set_helper_option(
+                       transport, "filter",
+                       data->transport_options.filter_options.filter_spec);
+
        if (data->fetch)
                return fetch_with_fetch(transport, nr_heads, to_fetch);