Documentation: point git-prune users to git-gc
Most users should be using git-gc instead of directly calling prune. For those who really do want more information on pruning, let's point them at git-fsck, which goes into slightly more detail on reachability. And since we're pointing users there, let's make sure reflogs are mentioned in git-fsck(1). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
Apr 29, 2008 at 16:45 UTC
8d308b35401b6abebb65aa97a322526ae11d7220
2 files changed
+22
-1
Documentation/git-fsck.txt
+2
-1
@@ -22,7 +22,8 @@ OPTIONS
22
An object to treat as the head of an unreachability trace.
23
+
24
If no objects are given, git-fsck defaults to using the
25
-index file and all SHA1 references in .git/refs/* as heads.
25
+index file, all SHA1 references in .git/refs/*, and all reflogs (unless
26
+--no-reflogs is given) as heads.
27
28
--unreachable::
29
Print out objects that exist but that aren't readable from any
Documentation/git-prune.txt
+20
@@ -13,6 +13,9 @@ SYNOPSIS
13
DESCRIPTION
14
-----------
15
16
+NOTE: In most cases, users should run linkgit:git-gc[1], which calls
17
+git-prune. See the section "NOTES", below.
18
+
19
This runs `git-fsck --unreachable` using all the refs
20
available in `$GIT_DIR/refs`, optionally with additional set of
21
objects specified on the command line, and prunes all
@@ -50,6 +53,23 @@ borrows from your repository via its
53
$ git prune $(cd ../another && $(git-rev-parse --all))
54
------------
55
56
+Notes
57
+-----
58
+
59
+In most cases, users will not need to call git-prune directly, but
60
+should instead call linkgit:git-gc[1], which handles pruning along with
61
+many other housekeeping tasks.
62
+
63
+For a description of which objects are considered for pruning, see
64
+git-fsck's --unreachable option.
65
+
66
+See Also
67
+--------
68
+
69
+linkgit:git-fsck[1],
70
+linkgit:git-gc[1],
71
+linkgit:git-reflog[1]
72
+
73
Author
74
------
75
Written by Linus Torvalds <torvalds@osdl.org>