aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/fetch.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-03-17 14:03:10 -0700
committerJunio C Hamano <gitster@pobox.com>2023-03-17 14:03:10 -0700
commit4d87411ffe2432efa8800b9e9d889241dd0f1f07 (patch)
tree1e558c7301712ced55ffcf1dcd5fccf357a6b287 /builtin/fetch.c
parentMerge branch 'mc/credential-helper-www-authenticate' (diff)
parentfetch: support hideRefs to speed up connectivity checks (diff)
downloadgit-4d87411ffe2432efa8800b9e9d889241dd0f1f07.tar.gz
git-4d87411ffe2432efa8800b9e9d889241dd0f1f07.zip
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
Diffstat (limited to 'builtin/fetch.c')
-rw-r--r--builtin/fetch.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c
index c98cd0efed..bf627e0412 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -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);
}