interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / Documentation / config / maintenance.adoc

136 lines · 6947 bytes Raw Blame History
1maintenance.auto::
2 This boolean config option controls whether some commands run
3 `git maintenance run --auto` after doing their normal work. Defaults
4 to true.
5
6maintenance.autoDetach::
7 Many Git commands trigger automatic maintenance after they have
8 written data into the repository. This boolean config option
9 controls whether this automatic maintenance shall happen in the
10 foreground or whether the maintenance process shall detach and
11 continue to run in the background.
12+
13If unset, the value of `gc.autoDetach` is used as a fallback. Defaults
14to true if both are unset, meaning that the maintenance process will
15detach.
16
17maintenance.strategy::
18 This string config option provides a way to specify one of a few
19 recommended strategies for repository maintenance. This affects
20 which tasks are run during `git maintenance run`, provided no
21 `--task=<task>` arguments are provided. This setting impacts manual
22 maintenance, auto-maintenance as well as scheduled maintenance. The
23 tasks that run may be different depending on the maintenance type.
24+
25The maintenance strategy can be further tweaked by setting
26`maintenance.<task>.enabled` and `maintenance.<task>.schedule`. If set, these
27values are used instead of the defaults provided by `maintenance.strategy`.
28+
29The possible strategies are:
30+
31* `none`: This strategy implies no tasks are run at all. This is the default
32 strategy for scheduled maintenance.
33* `gc`: This strategy runs the `gc` task.
34* `geometric`: This strategy performs geometric repacking of packfiles and
35 keeps auxiliary data structures up-to-date. The strategy expires data in the
36 reflog and removes worktrees that cannot be located anymore. When the
37 geometric repacking strategy would decide to do an all-into-one repack, then
38 the strategy generates a cruft pack for all unreachable objects. Objects that
39 are already part of a cruft pack will be expired.
40+
41This repacking strategy is a full replacement for the `gc` strategy and is
42recommended for large repositories. This is the default strategy for manual
43maintenance.
44+
45* `incremental`: This setting optimizes for performing small maintenance
46 activities that do not delete any data. This does not schedule the `gc`
47 task, but runs the `prefetch` and `commit-graph` tasks hourly, the
48 `loose-objects` and `incremental-repack` tasks daily, and the `pack-refs`
49 task weekly. Manual repository maintenance uses the `gc` task.
50
51maintenance.<task>.enabled::
52 This boolean config option controls whether the maintenance task
53 with name `<task>` is run when no `--task` option is specified to
54 `git maintenance run`. These config values are ignored if a
55 `--task` option exists. By default, only `maintenance.gc.enabled`
56 is true.
57
58maintenance.<task>.schedule::
59 This config option controls whether or not the given `<task>` runs
60 during a `git maintenance run --schedule=<frequency>` command. The
61 value must be one of "hourly", "daily", or "weekly".
62
63maintenance.commit-graph.auto::
64 This integer config option controls how often the `commit-graph` task
65 should be run as part of `git maintenance run --auto`. If zero, then
66 the `commit-graph` task will not run with the `--auto` option. A
67 negative value will force the task to run every time. Otherwise, a
68 positive value implies the command should run when the number of
69 reachable commits that are not in the commit-graph file is at least
70 the value of `maintenance.commit-graph.auto`. The default value is
71 100.
72
73maintenance.loose-objects.auto::
74 This integer config option controls how often the `loose-objects` task
75 should be run as part of `git maintenance run --auto`. If zero, then
76 the `loose-objects` task will not run with the `--auto` option. A
77 negative value will force the task to run every time. Otherwise, a
78 positive value implies the command should run when the number of
79 loose objects is at least the value of `maintenance.loose-objects.auto`.
80 The default value is 100.
81
82maintenance.loose-objects.batchSize::
83 This integer config option controls the maximum number of loose objects
84 written into a packfile during the `loose-objects` task. The default is
85 fifty thousand. Use value `0` to indicate no limit.
86
87maintenance.incremental-repack.auto::
88 This integer config option controls how often the `incremental-repack`
89 task should be run as part of `git maintenance run --auto`. If zero,
90 then the `incremental-repack` task will not run with the `--auto`
91 option. A negative value will force the task to run every time.
92 Otherwise, a positive value implies the command should run when the
93 number of pack-files not in the multi-pack-index is at least the value
94 of `maintenance.incremental-repack.auto`. The default value is 10.
95
96maintenance.geometric-repack.auto::
97 This integer config option controls how often the `geometric-repack`
98 task should be run as part of `git maintenance run --auto`. If zero,
99 then the `geometric-repack` task will not run with the `--auto`
100 option. A negative value will force the task to run every time.
101 Otherwise, a positive value implies the command should run either when
102 there are packfiles that need to be merged together to retain the
103 geometric progression, or when there are at least this many loose
104 objects that would be written into a new packfile. The default value is
105 6700.
106
107maintenance.geometric-repack.splitFactor::
108 This integer config option controls the factor used for the geometric
109 sequence. See the `--geometric=` option in linkgit:git-repack[1] for
110 more details. Defaults to `2`.
111
112maintenance.reflog-expire.auto::
113 This integer config option controls how often the `reflog-expire` task
114 should be run as part of `git maintenance run --auto`. If zero, then
115 the `reflog-expire` task will not run with the `--auto` option. A
116 negative value will force the task to run every time. Otherwise, a
117 positive value implies the command should run when the number of
118 expired reflog entries in the "HEAD" reflog is at least the value of
119 `maintenance.loose-objects.auto`. The default value is 100.
120
121maintenance.rerere-gc.auto::
122 This integer config option controls how often the `rerere-gc` task
123 should be run as part of `git maintenance run --auto`. If zero, then
124 the `rerere-gc` task will not run with the `--auto` option. A negative
125 value will force the task to run every time. Otherwise, a positive
126 value implies the command should run when the estimated number of stale
127 entries that would be pruned is greater than or equal to the configured
128 value. The default value is 512.
129
130maintenance.worktree-prune.auto::
131 This integer config option controls how often the `worktree-prune` task
132 should be run as part of `git maintenance run --auto`. If zero, then
133 the `worktree-prune` task will not run with the `--auto` option. A
134 negative value will force the task to run every time. Otherwise, a
135 positive value implies the command should run when the number of
136 prunable worktrees exceeds the value. The default value is 1.