Skip to content

Commit 6192940

Browse files
mhaggergitster
authored andcommitted
git-gc.txt, git-reflog.txt: document new expiry options
Document the new values that can be used for expiry values where their use makes sense: * git reflog expire --expire=[all|never] * git reflog expire --expire-unreachable=[all|never] * git gc --prune=all Other combinations aren't useful and therefore no documentation is added (even though they are allowed): * git gc --prune=never is redundant with "git gc --no-prune" * git prune --expire=all is equivalent to providing no --expire option * git prune --expire=never is a NOP Signed-off-by: Michael Haggerty <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3d27b9b commit 6192940

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

Documentation/git-gc.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ automatic consolidation of packs.
6262

6363
--prune=<date>::
6464
Prune loose objects older than date (default is 2 weeks ago,
65-
overridable by the config variable `gc.pruneExpire`). This
66-
option is on by default.
65+
overridable by the config variable `gc.pruneExpire`).
66+
--prune=all prunes loose objects regardless of their age.
67+
--prune is on by default.
6768

6869
--no-prune::
6970
Do not prune any loose objects.

Documentation/git-reflog.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,19 @@ them.
6767
--expire=<time>::
6868
Entries older than this time are pruned. Without the
6969
option it is taken from configuration `gc.reflogExpire`,
70-
which in turn defaults to 90 days.
70+
which in turn defaults to 90 days. --expire=all prunes
71+
entries regardless of their age; --expire=never turns off
72+
pruning of reachable entries (but see --expire-unreachable).
7173

7274
--expire-unreachable=<time>::
7375
Entries older than this time and not reachable from
7476
the current tip of the branch are pruned. Without the
7577
option it is taken from configuration
7678
`gc.reflogExpireUnreachable`, which in turn defaults to
77-
30 days.
79+
30 days. --expire-unreachable=all prunes unreachable
80+
entries regardless of their age; --expire-unreachable=never
81+
turns off early pruning of unreachable entries (but see
82+
--expire).
7883

7984
--all::
8085
Instead of listing <refs> explicitly, prune all refs.

0 commit comments

Comments
 (0)