diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-03-18 00:03:10 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-03-18 00:03:10 +0300 |
commit | 4d87411ffe2432efa8800b9e9d889241dd0f1f07 (patch) | |
tree | 1e558c7301712ced55ffcf1dcd5fccf357a6b287 /builtin | |
parent | 92c56da09683fa3331668adec073b6769da8f0b7 (diff) | |
parent | c6ce27ab08d30dd9d626d7a56cb928bc5792eb27 (diff) |
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')
-rw-r--r-- | builtin/fetch.c | 2 | ||||
-rw-r--r-- | builtin/rev-list.c | 2 |
2 files changed, 3 insertions, 1 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); } diff --git a/builtin/rev-list.c b/builtin/rev-list.c index 1a33d514d1..85e522dff8 100644 --- a/builtin/rev-list.c +++ b/builtin/rev-list.c @@ -39,7 +39,7 @@ static const char rev_list_usage[] = " --tags\n" " --remotes\n" " --stdin\n" -" --exclude-hidden=[receive|uploadpack]\n" +" --exclude-hidden=[fetch|receive|uploadpack]\n" " --quiet\n" " ordering output:\n" " --topo-order\n" |