e3e24de1bf
Back in5b92477f89
(builtin/gc.c: conditionally avoid pruning objects via loose, 2022-05-20), `git gc` learned the `--cruft` option and `gc.cruftPacks` configuration to opt-in to writing cruft packs when collecting or pruning unreachable objects. Cruft packs were introduced with the merge ina50036da1a
(Merge branch 'tb/cruft-packs', 2022-06-03). They address the problem of "loose object explosions", where Git will write out many individual loose objects when there is a large number of unreachable objects that have not yet aged past `--prune=<date>`. Instead of keeping track of those unreachable yet recent objects via their loose object file's mtime, cruft packs collect all unreachable objects into a single pack with a corresponding `*.mtimes` file that acts as a table to store the mtimes of all unreachable objects. This prevents the need to store unreachable objects as loose as they age out of the repository, and avoids the problem of loose object explosions. Beyond avoiding loose object explosions, cruft packs also act as a more efficient mechanism to store unreachable objects as they age out of a repository. This is because pairs of similar unreachable objects serve as delta bases for one another. In5b92477f89
, the feature was introduced as experimental. Since then, GitHub has been running these patches in every repository generating hundreds of millions of cruft packs along the way. The feature is battle-tested, and avoids many pathological cases such as above. Users who either run `git gc` manually, or via `git maintenance` can benefit from having cruft packs. As such, enable cruft pack generation to take place by default (by making `gc.cruftPacks` have the default of "true" rather than "false). Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
32 lines
1.5 KiB
Plaintext
32 lines
1.5 KiB
Plaintext
feature.*::
|
|
The config settings that start with `feature.` modify the defaults of
|
|
a group of other config settings. These groups are created by the Git
|
|
developer community as recommended defaults and are subject to change.
|
|
In particular, new config options may be added with different defaults.
|
|
|
|
feature.experimental::
|
|
Enable config options that are new to Git, and are being considered for
|
|
future defaults. Config settings included here may be added or removed
|
|
with each release, including minor version updates. These settings may
|
|
have unintended interactions since they are so new. Please enable this
|
|
setting if you are interested in providing feedback on experimental
|
|
features. The new default values are:
|
|
+
|
|
* `fetch.negotiationAlgorithm=skipping` may improve fetch negotiation times by
|
|
skipping more commits at a time, reducing the number of round trips.
|
|
|
|
feature.manyFiles::
|
|
Enable config options that optimize for repos with many files in the
|
|
working directory. With many files, commands such as `git status` and
|
|
`git checkout` may be slow and these new defaults improve performance:
|
|
+
|
|
* `index.skipHash=true` speeds up index writes by not computing a trailing
|
|
checksum. Note that this will cause Git versions earlier than 2.13.0 to
|
|
refuse to parse the index and Git versions earlier than 2.40.0 will report
|
|
a corrupted index during `git fsck`.
|
|
+
|
|
* `index.version=4` enables path-prefix compression in the index.
|
|
+
|
|
* `core.untrackedCache=true` enables the untracked cache. This setting assumes
|
|
that mtime is working on your machine.
|