diff options
author | Eric Wong <e@80x24.org> | 2023-02-12 12:04:26 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-02-27 20:27:03 +0300 |
commit | c6ce27ab08d30dd9d626d7a56cb928bc5792eb27 (patch) | |
tree | db78da0e93422555f1e18788c91f2e5aaa64a2ff /Documentation | |
parent | dadc8e6dacb629f46aee39bde90b6f09b73722eb (diff) |
fetch: support hideRefs to speed up connectivity checks
With roughly 800 remotes all fetching into their own
refs/remotes/$REMOTE/* island, the connectivity check[1] gets
expensive for each fetch on systems which lack sufficient RAM to
cache objects.
To do a no-op fetch on one $REMOTE out of hundreds, hideRefs now
allows the no-op fetch to take ~30 seconds instead of ~20 minutes
on a noisy, RAM-constrained machine (localhost, so no network latency):
git -c fetch.hideRefs=refs \
-c fetch.hideRefs='!refs/remotes/$REMOTE/' \
fetch $REMOTE
[1] `git rev-list --objects --stdin --not --all --quiet --alternate-refs'
Signed-off-by: Eric Wong <e@80x24.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-rev-parse.txt | 9 | ||||
-rw-r--r-- | Documentation/rev-list-options.txt | 9 |
2 files changed, 10 insertions, 8 deletions
diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt index bcd8069287..f26a7591e3 100644 --- a/Documentation/git-rev-parse.txt +++ b/Documentation/git-rev-parse.txt @@ -197,10 +197,11 @@ respectively, and they must begin with `refs/` when applied to `--glob` or `--all`. If a trailing '/{asterisk}' is intended, it must be given explicitly. ---exclude-hidden=[receive|uploadpack]:: - Do not include refs that would be hidden by `git-receive-pack` or - `git-upload-pack` by consulting the appropriate `receive.hideRefs` or - `uploadpack.hideRefs` configuration along with `transfer.hideRefs` (see +--exclude-hidden=[fetch|receive|uploadpack]:: + Do not include refs that would be hidden by `git-fetch`, + `git-receive-pack` or `git-upload-pack` by consulting the appropriate + `fetch.hideRefs`, `receive.hideRefs` or `uploadpack.hideRefs` + configuration along with `transfer.hideRefs` (see linkgit:git-config[1]). This option affects the next pseudo-ref option `--all` or `--glob` and is cleared after processing them. diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt index 0d90d5b154..90c73d6708 100644 --- a/Documentation/rev-list-options.txt +++ b/Documentation/rev-list-options.txt @@ -195,10 +195,11 @@ respectively, and they must begin with `refs/` when applied to `--glob` or `--all`. If a trailing '/{asterisk}' is intended, it must be given explicitly. ---exclude-hidden=[receive|uploadpack]:: - Do not include refs that would be hidden by `git-receive-pack` or - `git-upload-pack` by consulting the appropriate `receive.hideRefs` or - `uploadpack.hideRefs` configuration along with `transfer.hideRefs` (see +--exclude-hidden=[fetch|receive|uploadpack]:: + Do not include refs that would be hidden by `git-fetch`, + `git-receive-pack` or `git-upload-pack` by consulting the appropriate + `fetch.hideRefs`, `receive.hideRefs` or `uploadpack.hideRefs` + configuration along with `transfer.hideRefs` (see linkgit:git-config[1]). This option affects the next pseudo-ref option `--all` or `--glob` and is cleared after processing them. |