aboutsummaryrefslogtreecommitdiffstats
path: root/upload-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-02-05 14:26:09 -0800
committerJunio C Hamano <gitster@pobox.com>2019-02-05 14:26:10 -0800
commit073312b4c7a15d484d2ffdc2eb4a406df9cf9c55 (patch)
tree473d2508e4ba7d7e424445d2ddce2a9cf659ea46 /upload-pack.c
parentb99a579f8e434a7757f90895945b5711b3f159d5 (diff)
parent87c2d9d3102e6c388f2d29f1bdb0b3a222d9a707 (diff)
downloadgit-073312b4c7a15d484d2ffdc2eb4a406df9cf9c55.tar.gz
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 'upload-pack.c')
-rw-r--r--upload-pack.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/upload-pack.c b/upload-pack.c
index 9df27b55a0..ee89381585 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -139,14 +139,17 @@ static void create_pack_file(const struct object_array *have_obj,
if (use_include_tag)
argv_array_push(&pack_objects.args, "--include-tag");
if (filter_options.filter_spec) {
+ struct strbuf expanded_filter_spec = STRBUF_INIT;
+ expand_list_objects_filter_spec(&filter_options,
+ &expanded_filter_spec);
if (pack_objects.use_shell) {
struct strbuf buf = STRBUF_INIT;
- sq_quote_buf(&buf, filter_options.filter_spec);
+ sq_quote_buf(&buf, expanded_filter_spec.buf);
argv_array_pushf(&pack_objects.args, "--filter=%s", buf.buf);
strbuf_release(&buf);
} else {
argv_array_pushf(&pack_objects.args, "--filter=%s",
- filter_options.filter_spec);
+ expanded_filter_spec.buf);
}
}