Raw
1 maintenance.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
6 maintenance.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 +
13 If unset, the value of `gc.autoDetach` is used as a fallback. Defaults
14 to true if both are unset, meaning that the maintenance process will
15 detach.
16
17 maintenance.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 +
25 The maintenance strategy can be further tweaked by setting
26 `maintenance.<task>.enabled` and `maintenance.<task>.schedule`. If set, these
27 values are used instead of the defaults provided by `maintenance.strategy`.
28 +
29 The 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 +
41 This repacking strategy is a full replacement for the `gc` strategy and is
42 recommended for large repositories. This is the default strategy for manual
43 maintenance.
44 * `incremental`: This setting optimizes for performing small maintenance
45 activities that do not delete any data. This does not schedule the `gc`
46 task, but runs the `prefetch` and `commit-graph` tasks hourly, the
47 `loose-objects` and `incremental-repack` tasks daily, and the `pack-refs`
48 task weekly. Manual repository maintenance uses the `gc` task.
49
50 maintenance.<task>.enabled::
51 This boolean config option controls whether the maintenance task
52 with name `<task>` is run when no `--task` option is specified to
53 `git maintenance run`. These config values are ignored if a
54 `--task` option exists. By default, only `maintenance.gc.enabled`
55 is true.
56
57 maintenance.<task>.schedule::
58 This config option controls whether or not the given `<task>` runs
59 during a `git maintenance run --schedule=<frequency>` command. The
60 value must be one of "hourly", "daily", or "weekly".
61
62 maintenance.commit-graph.auto::
63 This integer config option controls how often the `commit-graph` task
64 should be run as part of `git maintenance run --auto`. If zero, then
65 the `commit-graph` task will not run with the `--auto` option. A
66 negative value will force the task to run every time. Otherwise, a
67 positive value implies the command should run when the number of
68 reachable commits that are not in the commit-graph file is at least
69 the value of `maintenance.commit-graph.auto`. The default value is
70 100.
71
72 maintenance.loose-objects.auto::
73 This integer config option controls how often the `loose-objects` task
74 should be run as part of `git maintenance run --auto`. If zero, then
75 the `loose-objects` task will not run with the `--auto` option. A
76 negative value will force the task to run every time. Otherwise, a
77 positive value implies the command should run when the number of
78 loose objects is at least the value of `maintenance.loose-objects.auto`.
79 The default value is 100.
80
81 maintenance.loose-objects.batchSize::
82 This integer config option controls the maximum number of loose objects
83 written into a packfile during the `loose-objects` task. The default is
84 fifty thousand. Use value `0` to indicate no limit.
85
86 maintenance.incremental-repack.auto::
87 This integer config option controls how often the `incremental-repack`
88 task should be run as part of `git maintenance run --auto`. If zero,
89 then the `incremental-repack` task will not run with the `--auto`
90 option. A negative value will force the task to run every time.
91 Otherwise, a positive value implies the command should run when the
92 number of pack-files not in the multi-pack-index is at least the value
93 of `maintenance.incremental-repack.auto`. The default value is 10.
94
95 maintenance.geometric-repack.auto::
96 This integer config option controls how often the `geometric-repack`
97 task should be run as part of `git maintenance run --auto`. If zero,
98 then the `geometric-repack` task will not run with the `--auto`
99 option. A negative value will force the task to run every time.
100 Otherwise, a positive value implies the command should run either when
101 there are packfiles that need to be merged together to retain the
102 geometric progression, or when there are at least this many loose
103 objects that would be written into a new packfile. The default value is
104 100.
105
106 maintenance.geometric-repack.splitFactor::
107 This integer config option controls the factor used for the geometric
108 sequence. See the `--geometric=` option in linkgit:git-repack[1] for
109 more details. Defaults to `2`.
110
111 maintenance.reflog-expire.auto::
112 This integer config option controls how often the `reflog-expire` task
113 should be run as part of `git maintenance run --auto`. If zero, then
114 the `reflog-expire` task will not run with the `--auto` option. A
115 negative value will force the task to run every time. Otherwise, a
116 positive value implies the command should run when the number of
117 expired reflog entries in the "HEAD" reflog is at least the value of
118 `maintenance.loose-objects.auto`. The default value is 100.
119
120 maintenance.rerere-gc.auto::
121 This integer config option controls how often the `rerere-gc` task
122 should be run as part of `git maintenance run --auto`. If zero, then
123 the `rerere-gc` task will not run with the `--auto` option. A negative
124 value will force the task to run every time. Otherwise, any positive
125 value implies the command will run when the "rr-cache" directory exists
126 and has at least one entry, regardless of whether it is stale or not.
127 This heuristic may be refined in the future. The default value is 1.
128
129 maintenance.worktree-prune.auto::
130 This integer config option controls how often the `worktree-prune` task
131 should be run as part of `git maintenance run --auto`. If zero, then
132 the `worktree-prune` task will not run with the `--auto` option. A
133 negative value will force the task to run every time. Otherwise, a
134 positive value implies the command should run when the number of
135 prunable worktrees exceeds the value. The default value is 1.