Git fork

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()

+6 -5
+1 -1
Documentation/config.txt
··· 3364 3364 stdout. 3365 3365 3366 3366 uploadpack.allowFilter:: 3367 - If this option is set, `upload-pack` will advertise partial 3367 + If this option is set, `upload-pack` will support partial 3368 3368 clone and partial fetch object filtering. 3369 3369 + 3370 3370 Note that this configuration variable is ignored if it is seen in the
+1
unpack-trees.c
··· 391 391 fetch_objects(repository_format_partial_clone, 392 392 &to_fetch); 393 393 fetch_if_missing = fetch_if_missing_store; 394 + oid_array_clear(&to_fetch); 394 395 } 395 396 for (i = 0; i < index->cache_nr; i++) { 396 397 struct cache_entry *ce = index->cache[i];
+4 -4
upload-pack.c
··· 69 69 static const char *pack_objects_hook; 70 70 71 71 static int filter_capability_requested; 72 - static int filter_advertise; 72 + static int allow_filter; 73 73 static struct list_objects_filter_options filter_options; 74 74 75 75 static void reset_timeout(void) ··· 846 846 no_progress = 1; 847 847 if (parse_feature_request(features, "include-tag")) 848 848 use_include_tag = 1; 849 - if (parse_feature_request(features, "filter")) 849 + if (allow_filter && parse_feature_request(features, "filter")) 850 850 filter_capability_requested = 1; 851 851 852 852 o = parse_object(&oid_buf); ··· 976 976 " allow-reachable-sha1-in-want" : "", 977 977 stateless_rpc ? " no-done" : "", 978 978 symref_info.buf, 979 - filter_advertise ? " filter" : "", 979 + allow_filter ? " filter" : "", 980 980 git_user_agent_sanitized()); 981 981 strbuf_release(&symref_info); 982 982 } else { ··· 1056 1056 if (!strcmp("uploadpack.packobjectshook", var)) 1057 1057 return git_config_string(&pack_objects_hook, var, value); 1058 1058 } else if (!strcmp("uploadpack.allowfilter", var)) { 1059 - filter_advertise = git_config_bool(var, value); 1059 + allow_filter = git_config_bool(var, value); 1060 1060 } 1061 1061 return parse_hide_refs_config(var, value, "uploadpack"); 1062 1062 }