summaryrefslogtreecommitdiff
path: root/Documentation/git-maintenance.txt
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2021-04-16 12:49:58 +0000
committerJunio C Hamano <gitster@pobox.com>2021-04-16 13:36:55 -0700
commitcfd781ea22e0f334d3c0104e1f34c47327934314 (patch)
treeaa9c39b5cb0b16b3a96c2dd6f271c25daef90eb2 /Documentation/git-maintenance.txt
parent2e03115d0c253843953ef9d113c72e0375892df4 (diff)
downloadgit-cfd781ea22e0f334d3c0104e1f34c47327934314.tar.gz
maintenance: use 'git fetch --prefetch'
The 'prefetch' maintenance task previously forced the following refspec for each remote: +refs/heads/*:refs/prefetch/<remote>/* If a user has specified a more strict refspec for the remote, then this prefetch task downloads more objects than necessary. The previous change introduced the '--prefetch' option to 'git fetch' which manipulates the remote's refspec to place all resulting refs into refs/prefetch/, with further partitioning based on the destinations of those refspecs. Update the documentation to be more generic about the destination refs. Do not mention custom refspecs explicitly, as that does not need to be highlighted in this documentation. The important part of placing refs in refs/prefetch/ remains. Reported-by: Tom Saeger <tom.saeger@oracle.com> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-maintenance.txt')
-rw-r--r--Documentation/git-maintenance.txt6
1 files changed, 2 insertions, 4 deletions
diff --git a/Documentation/git-maintenance.txt b/Documentation/git-maintenance.txt
index 80ddd33ceb..1e738ad398 100644
--- a/Documentation/git-maintenance.txt
+++ b/Documentation/git-maintenance.txt
@@ -92,10 +92,8 @@ commit-graph::
prefetch::
The `prefetch` task updates the object directory with the latest
objects from all registered remotes. For each remote, a `git fetch`
- command is run. The refmap is custom to avoid updating local or remote
- branches (those in `refs/heads` or `refs/remotes`). Instead, the
- remote refs are stored in `refs/prefetch/<remote>/`. Also, tags are
- not updated.
+ command is run. The configured refspec is modified to place all
+ requested refs within `refs/prefetch/`. Also, tags are not updated.
+
This is done to avoid disrupting the remote-tracking branches. The end users
expect these refs to stay unmoved unless they initiate a fetch. With prefetch