git-commit-vandalism/Documentation/config
Taylor Blau 05b9013b71 builtin/gc.c: ignore cruft packs with --keep-largest-pack
When cruft packs were implemented, we never adjusted the code for `git
gc`'s `--keep-largest-pack` and `gc.bigPackThreshold` to ignore cruft
packs. This option and configuration option share a common
implementation, but including cruft packs is wrong in both cases:

  - Running `git gc --keep-largest-pack` in a repository where the
    largest pack is the cruft pack itself will make it impossible for
    `git gc` to prune objects, since the cruft pack itself is kept.

  - The same is true for `gc.bigPackThreshold`, if the size of the cruft
    pack exceeds the limit set by the caller.

In the future, it is possible that `gc.bigPackThreshold` could be used
to write a separate cruft pack containing any new unreachable objects
that entered the repository since the last time a cruft pack was
written.

There are some complexities to doing so, mainly around handling
pruning objects that are in an existing cruft pack that is above the
threshold (which would either need to be rewritten, or else delay
pruning). Rewriting a substantially similar cruft pack isn't ideal, but
it is significantly better than the status-quo.

If users have large cruft packs that they don't want to rewrite, they
can mark them as `*.keep` packs. But in general, if a repository has a
cruft pack that is so large it is slowing down GC's, it should probably
be pruned anyway.

In the meantime, ignore cruft packs in the common implementation for
both of these options, and add a pair of tests to prevent any future
regressions here.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-04-18 14:56:47 -07:00
..
add.txt add: remove "add.interactive.useBuiltin" & Perl "git add--interactive" 2023-02-06 15:03:34 -08:00
advice.txt advice: add diverging advice for novices 2023-03-08 09:28:42 -08:00
alias.txt
am.txt
apply.txt
blame.txt
branch.txt push: default to single remote even when not named origin 2022-04-29 11:20:55 -07:00
browser.txt
bundle.txt bundle-uri: parse bundle.heuristic=creationToken 2023-01-31 08:57:48 -08:00
checkout.txt
clean.txt
clone.txt clone, submodule: pass partial clone filters to submodules 2022-02-09 15:38:36 -08:00
color.txt Merge branch 'hm/paint-hits-in-log-grep' 2021-11-01 13:48:08 -07:00
column.txt
commit.txt
commitgraph.txt
completion.txt
core.txt doc: use "commit-graph" hyphenation consistently 2022-10-30 19:58:40 -04:00
credential.txt
diff.txt difftool docs: de-duplicate configuration sections 2022-09-07 09:46:06 -07:00
difftool.txt difftool docs: de-duplicate configuration sections 2022-09-07 09:46:06 -07:00
extensions.txt Documentation: add extensions.worktreeConfig details 2022-02-08 09:49:20 -08:00
fastimport.txt
feature.txt features: feature.manyFiles implies fast index writes 2023-01-07 07:46:14 +09:00
fetch.txt bundle-uri: store fetch.bundleCreationToken 2023-01-31 08:57:48 -08:00
filter.txt
fmt-merge-msg.txt
format.txt format-patch: add format.noprefix option 2023-03-09 08:37:27 -08:00
fsck.txt fsck: document msg-id 2022-10-25 15:44:18 -07:00
fsmonitor--daemon.txt fsmonitor: add documentation for allowRemote and socketDir options 2022-10-05 11:05:23 -07:00
gc.txt builtin/gc.c: ignore cruft packs with --keep-largest-pack 2023-04-18 14:56:47 -07:00
gitcvs.txt
gitweb.txt
gpg.txt signature-format.txt: note SSH and X.509 signature delimiters 2023-02-27 13:42:43 -08:00
grep.txt grep docs: de-duplicate configuration sections 2022-09-07 09:46:05 -07:00
gui.txt
guitool.txt
help.txt
http.txt i18n: fix mismatched camelCase config variables 2022-06-17 10:38:26 -07:00
i18n.txt
imap.txt
includeif.txt config.txt: document include, includeIf 2022-07-17 14:23:42 -07:00
index.txt read-cache: add index.skipHash config option 2023-01-07 07:46:14 +09:00
init.txt
instaweb.txt
interactive.txt
log.txt diff-merges: clarify log.diffMerges documentation 2022-09-16 09:21:44 -07:00
lsrefs.txt docs: move protocol-related docs to man section 5 2022-08-04 14:12:23 -07:00
mailinfo.txt
mailmap.txt
maintenance.txt
man.txt
merge.txt update documentation for new zdiff3 conflictStyle 2021-12-01 14:45:59 -08:00
mergetool.txt Merge branch 'nb/doc-mergetool-typofix' into maint-2.38 2022-10-25 17:11:38 -07:00
notes.txt notes docs: de-duplicate and combine configuration sections 2022-09-07 09:46:06 -07:00
pack.txt Merge branch 'ac/bitmap-lookup-table' 2022-09-05 18:33:39 -07:00
pager.txt
pretty.txt
protocol.txt Sync with 2.37.4 2022-10-06 20:00:04 -04:00
pull.txt
push.txt Doc: document push.recurseSubmodules=only 2022-11-14 16:55:50 -05:00
rebase.txt rebase: add a config option for --rebase-merges 2023-03-27 09:32:49 -07:00
receive.txt
remote.txt docs: mention --refetch fetch option 2022-03-28 10:25:53 -07:00
remotes.txt
repack.txt builtin/repack.c: allow configuring cruft pack generation 2022-05-26 15:48:26 -07:00
rerere.txt
revert.txt revert: config documentation fixes 2022-06-27 08:37:36 -07:00
safe.txt setup.c: create safe.bareRepository 2022-07-14 15:08:29 -07:00
sendemail.txt send-email docs: de-duplicate configuration sections 2022-09-07 09:46:05 -07:00
sequencer.txt
showbranch.txt
sparse.txt repo_read_index: add config to expect files outside sparse patterns 2022-03-01 23:37:48 -08:00
splitindex.txt
ssh.txt
stash.txt stash: remove documentation for stash.useBuiltin 2022-01-27 18:00:37 -08:00
status.txt
submodule.txt branch: add --recurse-submodules option for branch creation 2022-02-04 08:16:39 -08:00
tag.txt
tar.txt
trace2.txt
transfer.txt bundle-uri client: add boolean transfer.bundleURI setting 2022-12-25 16:24:23 +09:00
uploadarchive.txt
uploadpack.txt Documentation: define protected configuration 2022-07-14 15:08:29 -07:00
url.txt
user.txt ssh signing: support non ssh-* keytypes 2021-11-19 09:05:25 -08:00
versionsort.txt
web.txt
worktree.txt