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()maint
commit
c2a499e6c3
|
@ -3364,7 +3364,7 @@ uploadpack.packObjectsHook::
|
||||||
stdout.
|
stdout.
|
||||||
|
|
||||||
uploadpack.allowFilter::
|
uploadpack.allowFilter::
|
||||||
If this option is set, `upload-pack` will advertise partial
|
If this option is set, `upload-pack` will support partial
|
||||||
clone and partial fetch object filtering.
|
clone and partial fetch object filtering.
|
||||||
+
|
+
|
||||||
Note that this configuration variable is ignored if it is seen in the
|
Note that this configuration variable is ignored if it is seen in the
|
||||||
|
|
|
@ -391,6 +391,7 @@ static int check_updates(struct unpack_trees_options *o)
|
||||||
fetch_objects(repository_format_partial_clone,
|
fetch_objects(repository_format_partial_clone,
|
||||||
&to_fetch);
|
&to_fetch);
|
||||||
fetch_if_missing = fetch_if_missing_store;
|
fetch_if_missing = fetch_if_missing_store;
|
||||||
|
oid_array_clear(&to_fetch);
|
||||||
}
|
}
|
||||||
for (i = 0; i < index->cache_nr; i++) {
|
for (i = 0; i < index->cache_nr; i++) {
|
||||||
struct cache_entry *ce = index->cache[i];
|
struct cache_entry *ce = index->cache[i];
|
||||||
|
|
|
@ -69,7 +69,7 @@ static int stateless_rpc;
|
||||||
static const char *pack_objects_hook;
|
static const char *pack_objects_hook;
|
||||||
|
|
||||||
static int filter_capability_requested;
|
static int filter_capability_requested;
|
||||||
static int filter_advertise;
|
static int allow_filter;
|
||||||
static struct list_objects_filter_options filter_options;
|
static struct list_objects_filter_options filter_options;
|
||||||
|
|
||||||
static void reset_timeout(void)
|
static void reset_timeout(void)
|
||||||
|
@ -846,7 +846,7 @@ static void receive_needs(void)
|
||||||
no_progress = 1;
|
no_progress = 1;
|
||||||
if (parse_feature_request(features, "include-tag"))
|
if (parse_feature_request(features, "include-tag"))
|
||||||
use_include_tag = 1;
|
use_include_tag = 1;
|
||||||
if (parse_feature_request(features, "filter"))
|
if (allow_filter && parse_feature_request(features, "filter"))
|
||||||
filter_capability_requested = 1;
|
filter_capability_requested = 1;
|
||||||
|
|
||||||
o = parse_object(&oid_buf);
|
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" : "",
|
" allow-reachable-sha1-in-want" : "",
|
||||||
stateless_rpc ? " no-done" : "",
|
stateless_rpc ? " no-done" : "",
|
||||||
symref_info.buf,
|
symref_info.buf,
|
||||||
filter_advertise ? " filter" : "",
|
allow_filter ? " filter" : "",
|
||||||
git_user_agent_sanitized());
|
git_user_agent_sanitized());
|
||||||
strbuf_release(&symref_info);
|
strbuf_release(&symref_info);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1056,7 +1056,7 @@ static int upload_pack_config(const char *var, const char *value, void *unused)
|
||||||
if (!strcmp("uploadpack.packobjectshook", var))
|
if (!strcmp("uploadpack.packobjectshook", var))
|
||||||
return git_config_string(&pack_objects_hook, var, value);
|
return git_config_string(&pack_objects_hook, var, value);
|
||||||
} else if (!strcmp("uploadpack.allowfilter", var)) {
|
} 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");
|
return parse_hide_refs_config(var, value, "uploadpack");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue