diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-03-29 15:39:59 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-29 15:39:59 -0700 |
commit | c2a499e6c31ed613a606ffdeb5bb74ab41e9a586 (patch) | |
tree | de51b47b2f12cdfe50d90152391b0de51dcdcd19 /upload-pack.c | |
parent | 03df4959472e7d4b5117bb72ac86e1e2bcf21723 (diff) | |
parent | c7620bd0f35dddf8b8519da6fbf97014f46d0710 (diff) | |
download | git-c2a499e6c31ed613a606ffdeb5bb74ab41e9a586.tar.gz |
Merge branch 'jh/partial-clone'
Hotfix.
* jh/partial-clone:
upload-pack: disable object filtering when disabled by config
unpack-trees: release oid_array after use in check_updates()
Diffstat (limited to 'upload-pack.c')
-rw-r--r-- | upload-pack.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/upload-pack.c b/upload-pack.c index f51b6cfca9..4a82602be5 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -69,7 +69,7 @@ static int stateless_rpc; static const char *pack_objects_hook; static int filter_capability_requested; -static int filter_advertise; +static int allow_filter; static struct list_objects_filter_options filter_options; static void reset_timeout(void) @@ -846,7 +846,7 @@ static void receive_needs(void) no_progress = 1; if (parse_feature_request(features, "include-tag")) use_include_tag = 1; - if (parse_feature_request(features, "filter")) + if (allow_filter && parse_feature_request(features, "filter")) filter_capability_requested = 1; o = parse_object(&oid_buf); @@ -976,7 +976,7 @@ static int send_ref(const char *refname, const struct object_id *oid, " allow-reachable-sha1-in-want" : "", stateless_rpc ? " no-done" : "", symref_info.buf, - filter_advertise ? " filter" : "", + allow_filter ? " filter" : "", git_user_agent_sanitized()); strbuf_release(&symref_info); } else { @@ -1056,7 +1056,7 @@ static int upload_pack_config(const char *var, const char *value, void *unused) if (!strcmp("uploadpack.packobjectshook", var)) return git_config_string(&pack_objects_hook, var, value); } else if (!strcmp("uploadpack.allowfilter", var)) { - filter_advertise = git_config_bool(var, value); + allow_filter = git_config_bool(var, value); } return parse_hide_refs_config(var, value, "uploadpack"); } |