Skip to content

Commit 8cc8816

Browse files
sunshinecogitster
authored andcommitted
Documentation/config: mention "now" and "never" for 'expire' settings
In addition to approxidate-style values ("2.months.ago", "yesterday"), consumers of 'gc.*expire*' configuration variables also accept and respect 'now' ("do it immediately") and 'never' ("suppress entirely"). Suggested-by: Michael Haggerty <[email protected]> Signed-off-by: Eric Sunshine <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5f5f553 commit 8cc8816

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

Documentation/config.txt

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,28 +1226,34 @@ gc.packrefs::
12261226
gc.pruneexpire::
12271227
When 'git gc' is run, it will call 'prune --expire 2.weeks.ago'.
12281228
Override the grace period with this config variable. The value
1229-
"now" may be used to disable this grace period and always prune
1230-
unreachable objects immediately.
1229+
"now" may be used to disable this grace period and always prune
1230+
unreachable objects immediately, or "never" may be used to
1231+
suppress pruning.
12311232

12321233
gc.worktreePruneExpire::
12331234
When 'git gc' is run, it calls
12341235
'git worktree prune --expire 3.months.ago'.
12351236
This config variable can be used to set a different grace
12361237
period. The value "now" may be used to disable the grace
1237-
period and prune $GIT_DIR/worktrees immediately.
1238+
period and prune $GIT_DIR/worktrees immediately, or "never"
1239+
may be used to suppress pruning.
12381240

12391241
gc.reflogexpire::
12401242
gc.<pattern>.reflogexpire::
12411243
'git reflog expire' removes reflog entries older than
1242-
this time; defaults to 90 days. With "<pattern>" (e.g.
1244+
this time; defaults to 90 days. The value "now" expires all
1245+
entries immediately, and "never" suppresses expiration
1246+
altogether. With "<pattern>" (e.g.
12431247
"refs/stash") in the middle the setting applies only to
12441248
the refs that match the <pattern>.
12451249

12461250
gc.reflogexpireunreachable::
12471251
gc.<ref>.reflogexpireunreachable::
12481252
'git reflog expire' removes reflog entries older than
12491253
this time and are not reachable from the current tip;
1250-
defaults to 30 days. With "<pattern>" (e.g. "refs/stash")
1254+
defaults to 30 days. The value "now" expires all entries
1255+
immediately, and "never" suppresses expiration altogether.
1256+
With "<pattern>" (e.g. "refs/stash")
12511257
in the middle, the setting applies only to the refs that
12521258
match the <pattern>.
12531259

0 commit comments

Comments
 (0)