[PATCH 1/4] gc docs: modernize the advice for manually running "gc"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The docs have been recommending that users need to run this manually,
but that hasn't been needed in practice for a long time.

Let's instead have this reflect reality and say that most users don't
need to run this manually at all.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx>
---
 Documentation/git-gc.txt | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt
index a7c1b0f60ed..cc82971022e 100644
--- a/Documentation/git-gc.txt
+++ b/Documentation/git-gc.txt
@@ -20,13 +20,17 @@ created from prior invocations of 'git add', packing refs, pruning
 reflog, rerere metadata or stale working trees. May also update ancillary
 indexes such as the commit-graph.
 
-Users are encouraged to run this task on a regular basis within
-each repository to maintain good disk space utilization and good
-operating performance.
+Most users should not have to run this command manually. When common
+porcelain operations that create objects are run, such as
+linkgit:git-commit[1] and linkgit:git-fetch[1], `git gc --auto` will
+be run automatically.
 
-Some git commands may automatically run 'git gc'; see the `--auto` flag
-below for details. If you know what you're doing and all you want is to
-disable this behavior permanently without further considerations, just do:
+You should only need to run `git gc` manually when adding objects to a
+repository without regularly running such porcelain commands. Another
+use-case is wanting to do a one-off repository optimization.
+
+If you know what you're doing and all you want is to disable automatic
+runs, do:
 
 ----------------------
 $ git config --global gc.auto 0
-- 
2.21.0.360.g471c308f928




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux