aboutsummaryrefslogtreecommitdiffstats
path: root/transport-helper.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-09-18 11:50:09 -0700
committerJunio C Hamano <gitster@pobox.com>2019-09-18 11:50:09 -0700
commit627b82683447e299fc2e20140318c276efbf7de2 (patch)
treefd0da2b151024ebe5a71db00e75ec8a41eff9fd6 /transport-helper.c
parentb9ac6c59b82dead613b31a51c8bca4dbd441bcbe (diff)
parent90d21f9ebf6906f0ebb4fb1b20ec9536072e2916 (diff)
downloadgit-627b82683447e299fc2e20140318c276efbf7de2.tar.gz
Merge branch 'md/list-objects-filter-combo'
The list-objects-filter API (used to create a sparse/lazy clone) learned to take a combined filter specification. * md/list-objects-filter-combo: list-objects-filter-options: make parser void list-objects-filter-options: clean up use of ALLOC_GROW list-objects-filter-options: allow mult. --filter strbuf: give URL-encoding API a char predicate fn list-objects-filter-options: make filter_spec a string_list list-objects-filter-options: move error check up list-objects-filter: implement composite filters list-objects-filter-options: always supply *errbuf list-objects-filter: put omits set in filter struct list-objects-filter: encapsulate filter components
Diffstat (limited to 'transport-helper.c')
-rw-r--r--transport-helper.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/transport-helper.c b/transport-helper.c
index 6b05a88faf..3169111772 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -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)