unpack-trees: rename 'is_excluded_from_list()'
[gitweb.git] / transport-helper.c
index cec83bd663d0f27589bd09176e38b084270f56c4..0a34544df06b9ab198b0bae01948f2ddb2370724 100644 (file)
@@ -423,7 +423,7 @@ static int get_importer(struct transport *transport, struct child_process *fasti
        struct helper_data *data = transport->data;
        int cat_blob_fd, code;
        child_process_init(fastimport);
-       fastimport->in = helper->out;
+       fastimport->in = xdup(helper->out);
        argv_array_push(&fastimport->args, "fast-import");
        argv_array_push(&fastimport->args, debug ? "--stats" : "--quiet");
 
@@ -682,13 +682,9 @@ static int fetch(struct transport *transport,
                set_helper_option(transport, "update-shallow", "true");
 
        if (data->transport_options.filter_options.choice) {
-               struct strbuf expanded_filter_spec = STRBUF_INIT;
-               expand_list_objects_filter_spec(
-                       &data->transport_options.filter_options,
-                       &expanded_filter_spec);
-               set_helper_option(transport, "filter",
-                                 expanded_filter_spec.buf);
-               strbuf_release(&expanded_filter_spec);
+               const char *spec = expand_list_objects_filter_spec(
+                       &data->transport_options.filter_options);
+               set_helper_option(transport, "filter", spec);
        }
 
        if (data->transport_options.negotiation_tips)