summaryrefslogtreecommitdiff
path: root/transport-helper.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-02-05 22:26:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-02-05 22:26:10 (GMT)
commit073312b4c7a15d484d2ffdc2eb4a406df9cf9c55 (patch)
tree473d2508e4ba7d7e424445d2ddce2a9cf659ea46 /transport-helper.c
parentb99a579f8e434a7757f90895945b5711b3f159d5 (diff)
parent87c2d9d3102e6c388f2d29f1bdb0b3a222d9a707 (diff)
downloadgit-073312b4c7a15d484d2ffdc2eb4a406df9cf9c55.zip
git-073312b4c7a15d484d2ffdc2eb4a406df9cf9c55.tar.gz
git-073312b4c7a15d484d2ffdc2eb4a406df9cf9c55.tar.bz2
Merge branch 'js/filter-options-should-use-plain-int'
Update the protocol message specification to allow only the limited use of scaled quantities. This is ensure potential compatibility issues will not go out of hand. * js/filter-options-should-use-plain-int: filter-options: expand scaled numbers tree:<depth>: skip some trees even when collecting omits list-objects-filter: teach tree:# how to handle >0
Diffstat (limited to 'transport-helper.c')
-rw-r--r--transport-helper.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/transport-helper.c b/transport-helper.c
index 6cf3bb3..1f52c95 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -679,10 +679,15 @@ 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->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);
+ }
if (data->transport_options.negotiation_tips)
warning("Ignoring --negotiation-tip because the protocol does not support it.");