Merge branch 'ew/fetch-hiderefs'

A new "fetch.hideRefs" option can be used to exclude specified refs
from "rev-list --objects --stdin --not --all" traversal for
checking object connectivity, most useful when there are many
unrelated histories in a single repository.

* ew/fetch-hiderefs:
  fetch: support hideRefs to speed up connectivity checks
This commit is contained in:
Junio C Hamano
2023-03-17 14:03:10 -07:00
8 changed files with 26 additions and 12 deletions

View File

@ -1133,6 +1133,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
if (!connectivity_checked) {
struct check_connected_options opt = CHECK_CONNECTED_INIT;
opt.exclude_hidden_refs_section = "fetch";
rm = ref_map;
if (check_connected(iterate_ref_map, &rm, &opt)) {
rc = error(_("%s did not send all necessary objects\n"), url);
@ -1326,6 +1327,7 @@ static int check_exist_and_connected(struct ref *ref_map)
}
opt.quiet = 1;
opt.exclude_hidden_refs_section = "fetch";
return check_connected(iterate_ref_map, &rm, &opt);
}