git/Documentation
Taylor Blau 757d457907 midx.c: prevent `expire` from removing the cruft pack
The `expire` sub-command unlinks any packs that are (a) contained in the
MIDX, but (b) have no objects referenced by the MIDX.

This sub-command ignores `.keep` packs, which remain on-disk even if
they have no objects referenced by the MIDX. Cruft packs, however,
aren't given the same treatment: if none of the objects contained in the
cruft pack are selected from the cruft pack by the MIDX, then the cruft
pack is eligible to be expired.

This is less than desireable, since the cruft pack has important
metadata about the individual object mtimes, which is useful to
determine how quickly an object should age out of the repository when
pruning.

Ordinarily, we wouldn't expect the contents of a cruft pack to
duplicated across non-cruft packs (and we'd expect to see the MIDX
select all cruft objects from other sources even less often). But
nonetheless, it is still possible to trick the `expire` sub-command into
removing the `.mtimes` file in this circumstance.

Teach the `expire` sub-command to ignore cruft packs in the same manner
as it does `.keep` packs, in order to keep their metadata around, even
when they are unreferenced by the MIDX.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-09-21 10:21:46 -07:00
..
RelNotes A bit more of remaining topics before -rc1 2022-09-19 14:35:25 -07:00
config Merge branch 'js/typofix' 2022-09-15 16:09:46 -07:00
howto docs: move pack format docs to man section 5 2022-08-04 14:12:24 -07:00
includes docs: add and use include template for config/* includes 2022-09-07 09:46:05 -07:00
mergetools
technical Merge branch 'vd/scalar-to-main' 2022-09-19 14:35:25 -07:00
.gitattributes
.gitignore
CodingGuidelines Documentation: fix various repeat word typos 2022-09-12 11:04:55 -07:00
Makefile Merge branch 'vd/scalar-to-main' 2022-09-19 14:35:25 -07:00
MyFirstContribution.txt
MyFirstObjectWalk.txt
SubmittingPatches
ToolsForGit.txt
asciidoc.conf
asciidoctor-extensions.rb
blame-options.txt
build-docdep.perl
cat-texi.perl
cmd-list.perl scalar: add to 'git help -a' command list 2022-09-02 10:02:56 -07:00
config.txt Merge branch 'mb/config-document-include' into maint 2022-08-05 15:51:36 -07:00
date-formats.txt
diff-format.txt diff-format.txt: correct misleading wording 2022-06-13 11:57:03 -07:00
diff-generate-patch.txt
diff-options.txt
doc-diff
docbook-xsl.css
docbook.xsl
everyday.txto
fetch-options.txt
fix-texi.perl
git-add.txt Merge branch 'ab/dedup-config-and-command-docs' 2022-09-14 12:56:40 -07:00
git-am.txt Merge branch 'ab/dedup-config-and-command-docs' 2022-09-14 12:56:40 -07:00
git-annotate.txt
git-apply.txt apply docs: de-duplicate configuration sections 2022-09-07 09:46:05 -07:00
git-archimport.txt
git-archive.txt archive-tar: use internal gzip by default 2022-06-15 13:19:47 -07:00
git-bisect-lk2009.txt
git-bisect.txt
git-blame.txt docs: add CONFIGURATION sections that fuzzy map to built-ins 2022-09-07 09:46:07 -07:00
git-branch.txt docs: add CONFIGURATION sections that fuzzy map to built-ins 2022-09-07 09:46:07 -07:00
git-bugreport.txt builtin/bugreport.c: create '--diagnose' option 2022-08-12 13:20:02 -07:00
git-bundle.txt Documentation: fix various repeat word typos 2022-09-12 11:04:55 -07:00
git-cat-file.txt Merge branch 'tb/cat-file-z' 2022-08-05 15:52:14 -07:00
git-check-attr.txt
git-check-ignore.txt
git-check-mailmap.txt
git-check-ref-format.txt
git-checkout-index.txt
git-checkout.txt docs: add CONFIGURATION sections that fuzzy map to built-ins 2022-09-07 09:46:07 -07:00
git-cherry-pick.txt doc: consolidate --rerere-autoupdate description 2022-08-03 13:47:11 -07:00
git-cherry.txt
git-citool.txt
git-clean.txt docs: add CONFIGURATION sections that map to a built-in 2022-09-07 09:46:06 -07:00
git-clone.txt Merge branch 'ab/dedup-config-and-command-docs' 2022-09-14 12:56:40 -07:00
git-column.txt docs: add CONFIGURATION sections that fuzzy map to built-ins 2022-09-07 09:46:07 -07:00
git-commit-graph.txt Merge branch 'ab/dedup-config-and-command-docs' 2022-09-14 12:56:40 -07:00
git-commit-tree.txt
git-commit.txt docs: add CONFIGURATION sections that map to a built-in 2022-09-07 09:46:06 -07:00
git-config.txt Documentation: define protected configuration 2022-07-14 15:08:29 -07:00
git-count-objects.txt
git-credential-cache--daemon.txt
git-credential-cache.txt
git-credential-store.txt
git-credential.txt
git-cvsexportcommit.txt
git-cvsimport.txt
git-cvsserver.txt git-cvsserver: clarify directory list 2022-07-19 12:45:31 -07:00
git-daemon.txt daemon: clarify directory arguments 2022-07-19 12:45:31 -07:00
git-describe.txt
git-diagnose.txt builtin/diagnose.c: add '--mode' option 2022-08-12 13:20:02 -07:00
git-diff-files.txt
git-diff-index.txt diff-index.txt: update raw output format in examples 2022-06-13 11:59:16 -07:00
git-diff-tree.txt
git-diff.txt docs: add CONFIGURATION sections that fuzzy map to built-ins 2022-09-07 09:46:07 -07:00
git-difftool.txt difftool docs: de-duplicate configuration sections 2022-09-07 09:46:06 -07:00
git-fast-export.txt
git-fast-import.txt docs: add CONFIGURATION sections that map to a built-in 2022-09-07 09:46:06 -07:00
git-fetch-pack.txt
git-fetch.txt docs: add CONFIGURATION sections that fuzzy map to built-ins 2022-09-07 09:46:07 -07:00
git-filter-branch.txt
git-fmt-merge-msg.txt
git-for-each-ref.txt
git-for-each-repo.txt
git-format-patch.txt format-patch: learn format.forceInBodyFrom configuration variable 2022-08-29 14:39:13 -07:00
git-fsck-objects.txt
git-fsck.txt docs: add and use include template for config/* includes 2022-09-07 09:46:05 -07:00
git-fsmonitor--daemon.txt
git-gc.txt docs: add and use include template for config/* includes 2022-09-07 09:46:05 -07:00
git-get-tar-commit-id.txt
git-grep.txt grep docs: de-duplicate configuration sections 2022-09-07 09:46:05 -07:00
git-gui.txt
git-hash-object.txt
git-help.txt git docs: add a category for file formats, protocols and interfaces 2022-08-04 14:12:23 -07:00
git-hook.txt
git-http-backend.txt
git-http-fetch.txt
git-http-push.txt
git-imap-send.txt docs: add and use include template for config/* includes 2022-09-07 09:46:05 -07:00
git-index-pack.txt
git-init-db.txt
git-init.txt docs: add CONFIGURATION sections that fuzzy map to built-ins 2022-09-07 09:46:07 -07:00
git-instaweb.txt
git-interpret-trailers.txt Documentation: clarify whitespace rules for trailers 2022-08-30 10:17:34 -07:00
git-log.txt Merge branch 'ab/dedup-config-and-command-docs' 2022-09-14 12:56:40 -07:00
git-ls-files.txt ls-files: introduce "--format" option 2022-07-23 10:53:55 -07:00
git-ls-remote.txt
git-ls-tree.txt
git-mailinfo.txt docs: add CONFIGURATION sections that map to a built-in 2022-09-07 09:46:06 -07:00
git-mailsplit.txt
git-maintenance.txt docs: add CONFIGURATION sections that map to a built-in 2022-09-07 09:46:06 -07:00
git-merge-base.txt
git-merge-file.txt
git-merge-index.txt
git-merge-one-file.txt
git-merge-tree.txt git-merge-tree.txt: add a section on potentional usage mistakes 2022-06-22 16:10:06 -07:00
git-merge.txt Merge branch 'ab/dedup-config-and-command-docs' 2022-09-14 12:56:40 -07:00
git-mergetool--lib.txt
git-mergetool.txt docs: add and use include template for config/* includes 2022-09-07 09:46:05 -07:00
git-mktag.txt
git-mktree.txt
git-multi-pack-index.txt midx.c: prevent `expire` from removing the cruft pack 2022-09-21 10:21:46 -07:00
git-mv.txt
git-name-rev.txt
git-notes.txt notes docs: de-duplicate and combine configuration sections 2022-09-07 09:46:06 -07:00
git-p4.txt
git-pack-objects.txt
git-pack-redundant.txt
git-pack-refs.txt
git-patch-id.txt
git-prune-packed.txt
git-prune.txt
git-pull.txt
git-push.txt docs: add CONFIGURATION sections that map to a built-in 2022-09-07 09:46:06 -07:00
git-quiltimport.txt
git-range-diff.txt range-diff: optionally accept pathspecs 2022-08-26 09:49:26 -07:00
git-read-tree.txt
git-rebase.txt Merge branch 'ab/dedup-config-and-command-docs' 2022-09-14 12:56:40 -07:00
git-receive-pack.txt
git-reflog.txt Documentation/git-reflog: remove unneeded \ from \{ 2022-08-01 14:33:44 -07:00
git-remote-ext.txt
git-remote-fd.txt
git-remote-helpers.txto
git-remote.txt
git-repack.txt
git-replace.txt
git-request-pull.txt
git-rerere.txt
git-reset.txt
git-restore.txt
git-rev-list.txt
git-rev-parse.txt
git-revert.txt Merge branch 'ab/dedup-config-and-command-docs' 2022-09-14 12:56:40 -07:00
git-rm.txt
git-send-email.txt send-email docs: de-duplicate configuration sections 2022-09-07 09:46:05 -07:00
git-send-pack.txt
git-sh-i18n--envsubst.txt
git-sh-i18n.txt
git-sh-setup.txt
git-shell.txt
git-shortlog.txt
git-show-branch.txt docs: add CONFIGURATION sections that map to a built-in 2022-09-07 09:46:06 -07:00
git-show-index.txt
git-show-ref.txt
git-show.txt
git-sparse-checkout.txt
git-stage.txt
git-stash.txt docs: add CONFIGURATION sections that map to a built-in 2022-09-07 09:46:06 -07:00
git-status.txt
git-stripspace.txt
git-submodule.txt
git-svn.txt
git-switch.txt docs: add CONFIGURATION sections that fuzzy map to built-ins 2022-09-07 09:46:07 -07:00
git-symbolic-ref.txt
git-tag.txt
git-tools.txt
git-unpack-file.txt
git-unpack-objects.txt
git-update-index.txt Documentation: fix various repeat word typos 2022-09-12 11:04:55 -07:00
git-update-ref.txt
git-update-server-info.txt
git-upload-archive.txt
git-upload-pack.txt Documentation: fix various repeat word typos 2022-09-12 11:04:55 -07:00
git-var.txt
git-verify-commit.txt
git-verify-pack.txt
git-verify-tag.txt
git-version.txt
git-web--browse.txt
git-whatchanged.txt
git-worktree.txt
git-write-tree.txt
git.txt Merge branch 'ab/tech-docs-to-help' 2022-08-14 23:19:28 -07:00
gitattributes.txt
gitcli.txt
gitcore-tutorial.txt
gitcredentials.txt
gitcvs-migration.txt
gitdiffcore.txt
giteveryday.txt
gitfaq.txt
gitformat-bundle.txt docs: move protocol-related docs to man section 5 2022-08-04 14:12:23 -07:00
gitformat-chunk.txt docs: move pack format docs to man section 5 2022-08-04 14:12:24 -07:00
gitformat-commit-graph.txt docs: move pack format docs to man section 5 2022-08-04 14:12:24 -07:00
gitformat-index.txt Merge branch 'ab/tech-docs-to-help' 2022-08-14 23:19:28 -07:00
gitformat-pack.txt docs: move cruft pack docs to gitformat-pack 2022-08-04 14:12:24 -07:00
gitformat-signature.txt docs: move signature docs to man section 5 2022-08-04 14:12:24 -07:00
gitglossary.txt
githooks.txt
gitignore.txt
gitk.txt
gitmailmap.txt
gitmodules.txt
gitnamespaces.txt
gitprotocol-capabilities.txt docs: move protocol-related docs to man section 5 2022-08-04 14:12:23 -07:00
gitprotocol-common.txt docs: move protocol-related docs to man section 5 2022-08-04 14:12:23 -07:00
gitprotocol-http.txt docs: move http-protocol docs to man section 5 2022-08-04 14:12:24 -07:00
gitprotocol-pack.txt docs: move http-protocol docs to man section 5 2022-08-04 14:12:24 -07:00
gitprotocol-v2.txt docs: move http-protocol docs to man section 5 2022-08-04 14:12:24 -07:00
gitremote-helpers.txt remote-curl: add 'get' capability 2022-08-10 14:07:37 -07:00
gitrepository-layout.txt
gitrevisions.txt
gitsubmodules.txt
gittutorial-2.txt
gittutorial.txt
gitweb.conf.txt
gitweb.txt
gitworkflows.txt
glossary-content.txt
howto-index.sh
i18n.txt
install-doc-quick.sh
install-webdoc.sh
line-range-format.txt
line-range-options.txt
lint-gitlink.perl
lint-man-end-blurb.perl
lint-man-section-order.perl git docs: add a category for file formats, protocols and interfaces 2022-08-04 14:12:23 -07:00
manpage-base-url.xsl.in
manpage-bold-literal.xsl
manpage-normal.xsl
manpage-quote-apos.xsl
manpage.xsl
merge-options.txt
merge-strategies.txt
object-format-disclaimer.txt
pretty-formats.txt
pretty-options.txt
pull-fetch-param.txt
ref-reachability-filters.txt
rerere-options.txt doc: clarify rerere-autoupdate 2022-08-03 13:57:25 -07:00
rev-list-description.txt
rev-list-options.txt Merge branch 'en/ancestry-path-in-a-range' 2022-08-29 14:55:11 -07:00
revisions.txt Merge branch 'tk/rev-parse-doc-clarify-at-u' into maint 2022-07-27 13:19:52 -07:00
scalar.txt scalar: include in standard Git build & installation 2022-09-02 10:02:55 -07:00
sequencer.txt
signoff-option.txt
texi.xsl
trace2-target-values.txt
transfer-data-leaks.txt
urls-remotes.txt
urls.txt
user-manual.conf
user-manual.txt docs: move pack format docs to man section 5 2022-08-04 14:12:24 -07:00