Documentation/gc: warn against --prune=<now>

"git gc" is safe to run anytime only because it has the built-in grace period to protect objects that are created by other processes that are waiting for ref updates to anchor them to the history. In order to run with no grace period, the user must make sure that the repository is quiescent. Reviewed-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Oct 14, 2015 at 13:48 UTC fae1a901ec1811a325c6ccf7acac281e615478f0
1 file changed +5 -2
Documentation/git-gc.txt
+5 -2
@@ -63,8 +63,11 @@ automatic consolidation of packs.
63 --prune=<date>::
64 Prune loose objects older than date (default is 2 weeks ago,
65 overridable by the config variable `gc.pruneExpire`).
66 - --prune=all prunes loose objects regardless of their age.
67 - --prune is on by default.
66 + --prune=all prunes loose objects regardless of their age (do
67 + not use --prune=all unless you know exactly what you are doing.
68 + Unless the repository is quiescent, you will lose newly created
69 + objects that haven't been anchored with the refs and end up
70 + corrupting your repository). --prune is on by default.
71
72 --no-prune::
73 Do not prune any loose objects.