git-commit-vandalism/Documentation
Taylor Blau 5d3cd09a80 midx: reject empty --preferred-pack's
The soon-to-be-implemented multi-pack bitmap treats object in the first
bit position specially by assuming that all objects in the pack it was
selected from are also represented from that pack in the MIDX. In other
words, the pack from which the first object was selected must also have
all of its other objects selected from that same pack in the MIDX in
case of any duplicates.

But this assumption relies on the fact that there is at least one object
in that pack to begin with; otherwise the object in the first bit
position isn't from a preferred pack, in which case we can no longer
assume that all objects in that pack were also selected from the same
pack.

Guard this assumption by checking the number of objects in the given
preferred pack, and failing if the given pack is empty.

To make sure we can safely perform this check, open any packs which are
contained in an existing MIDX via prepare_midx_pack(). The same is done
for new packs via the add_pack_to_midx() callback, but packs picked up
from a previous MIDX will not yet have these opened.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-01 10:58:43 -07:00
..
config Merge branch 'pb/submodule-recurse-doc' 2021-08-02 14:06:39 -07:00
howto
RelNotes Git 2.33 2021-08-16 12:15:44 -07:00
technical Documentation: describe MIDX-based bitmaps 2021-08-24 13:21:13 -07:00
.gitattributes
.gitignore
asciidoc.conf
asciidoctor-extensions.rb
blame-options.txt
build-docdep.perl
cat-texi.perl
cmd-list.perl
CodingGuidelines Merge branch 'ds/gender-neutral-doc-guidelines' 2021-07-28 13:18:02 -07:00
config.txt
date-formats.txt
diff-format.txt
diff-generate-patch.txt doc: point to diff attribute in patch format docs 2021-04-28 13:34:44 +09:00
diff-options.txt Merge branch 'jn/log-m-does-not-imply-p' 2021-08-11 12:36:18 -07:00
doc-diff
docbook-xsl.css
docbook.xsl
everyday.txto
fetch-options.txt fetch: document the --negotiate-only option 2021-06-30 14:57:22 -07:00
fix-texi.perl
git-add.txt
git-am.txt am: learn to process quoted lines that ends with CRLF 2021-05-10 15:06:22 +09:00
git-annotate.txt
git-apply.txt git-apply: allow simultaneous --cached and --3way options 2021-04-07 22:20:33 -07:00
git-archimport.txt
git-archive.txt
git-bisect-lk2009.txt
git-bisect.txt
git-blame.txt
git-branch.txt
git-bugreport.txt
git-bundle.txt
git-cat-file.txt
git-check-attr.txt
git-check-ignore.txt
git-check-mailmap.txt
git-check-ref-format.txt
git-checkout-index.txt
git-checkout.txt
git-cherry-pick.txt
git-cherry.txt
git-citool.txt
git-clean.txt
git-clone.txt
git-column.txt
git-commit-graph.txt
git-commit-tree.txt
git-commit.txt Documentation: fix typo in the --patch option of the commit command 2021-06-28 13:08:25 -07:00
git-config.txt doc/git-config: simplify "override" advice for FILES section 2021-07-20 14:55:06 -07:00
git-count-objects.txt
git-credential-cache--daemon.txt
git-credential-cache.txt
git-credential-store.txt
git-credential.txt doc lint: lint and fix missing "GIT" end sections 2021-04-10 23:36:34 -07:00
git-cvsexportcommit.txt
git-cvsimport.txt
git-cvsserver.txt docs: fix linting issues due to incorrect relative section order 2021-04-10 23:36:34 -07:00
git-daemon.txt
git-describe.txt describe-doc: clarify default length of abbreviation 2021-05-17 15:56:29 +09:00
git-diff-files.txt
git-diff-index.txt
git-diff-tree.txt
git-diff.txt git-diff: fix missing --merge-base docs 2021-07-12 13:55:29 -07:00
git-difftool.txt
git-fast-export.txt
git-fast-import.txt
git-fetch-pack.txt
git-fetch.txt Documentation: render special characters correctly 2021-07-30 09:08:12 -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 Merge branch 'jk/doc-format-patch-skips-merges' 2021-05-11 15:27:23 +09:00
git-fsck-objects.txt
git-fsck.txt
git-gc.txt
git-get-tar-commit-id.txt
git-grep.txt docs: fix linting issues due to incorrect relative section order 2021-04-10 23:36:34 -07:00
git-gui.txt
git-hash-object.txt
git-help.txt
git-http-backend.txt
git-http-fetch.txt
git-http-push.txt
git-imap-send.txt
git-index-pack.txt
git-init-db.txt
git-init.txt
git-instaweb.txt
git-interpret-trailers.txt trailer: add new .cmd config option 2021-05-04 12:09:43 +09:00
git-log.txt doc/log: correct default for --decorate 2021-06-08 13:34:48 +09:00
git-ls-files.txt
git-ls-remote.txt
git-ls-tree.txt
git-mailinfo.txt mailinfo: allow stripping quoted CR without warning 2021-05-10 15:06:22 +09:00
git-mailsplit.txt
git-maintenance.txt maintenance: use 'git fetch --prefetch' 2021-04-16 13:36:55 -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.txt
git-mergetool--lib.txt
git-mergetool.txt
git-mktag.txt docs: fix linting issues due to incorrect relative section order 2021-04-10 23:36:34 -07:00
git-mktree.txt
git-multi-pack-index.txt midx: reject empty --preferred-pack's 2021-09-01 10:58:43 -07:00
git-mv.txt
git-name-rev.txt
git-notes.txt
git-p4.txt doc lint: lint and fix missing "GIT" end sections 2021-04-10 23:36:34 -07:00
git-pack-objects.txt Merge branch 'jk/doc-max-pack-size' 2021-07-08 13:15:03 -07:00
git-pack-redundant.txt
git-pack-refs.txt
git-patch-id.txt
git-prune-packed.txt
git-prune.txt
git-pull.txt doc: pull: fix rebase=false documentation 2021-07-21 16:34:06 -07:00
git-push.txt Merge branch 'ds/gender-neutral-doc' 2021-07-16 17:42:53 -07:00
git-quiltimport.txt
git-range-diff.txt
git-read-tree.txt
git-rebase.txt Merge branch 'ab/rebase-no-reschedule-failed-exec' 2021-05-07 12:47:40 +09:00
git-receive-pack.txt
git-reflog.txt
git-remote-ext.txt
git-remote-fd.txt
git-remote-helpers.txto
git-remote.txt
git-repack.txt Merge branch 'jk/doc-max-pack-size' 2021-07-08 13:15:03 -07:00
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
git-rm.txt rm: honor sparse checkout patterns 2021-04-08 14:18:03 -07:00
git-send-email.txt git-send-email: add option to specify sendmail command 2021-05-17 07:06:13 +09:00
git-send-pack.txt
git-sh-i18n--envsubst.txt correct a few doubled-word nits in comments and documentation 2012-03-28 11:18:35 -07:00
git-sh-i18n.txt
git-sh-setup.txt
git-shell.txt
git-shortlog.txt mailmap: only look for .mailmap in work tree 2021-02-10 13:34:51 -08:00
git-show-branch.txt Documentation/git-show-branch: avoid literal {apostrophe} 2019-04-10 12:05:03 +09:00
git-show-index.txt
git-show-ref.txt
git-show.txt
git-sparse-checkout.txt
git-stage.txt
git-stash.txt stash show: use stash.showIncludeUntracked even when diff options given 2021-05-22 17:56:46 +09:00
git-status.txt
git-stripspace.txt
git-submodule.txt
git-svn.txt docs: fix linting issues due to incorrect relative section order 2021-04-10 23:36:34 -07:00
git-switch.txt
git-symbolic-ref.txt
git-tag.txt
git-tools.txt
git-unpack-file.txt
git-unpack-objects.txt unpack-objects: add --max-input-size=<size> option 2016-08-24 12:31:05 -07:00
git-update-index.txt
git-update-ref.txt
git-update-server-info.txt
git-upload-archive.txt Documentation: match underline with the text 2015-10-22 10:16:12 -07:00
git-upload-pack.txt
git-var.txt
git-verify-commit.txt
git-verify-pack.txt
git-verify-tag.txt
git-web--browse.txt
git-whatchanged.txt
git-worktree.txt Merge branch 'sm/worktree-add-lock' 2021-07-28 13:17:58 -07:00
git-write-tree.txt
git.txt Merge branch 'ps/config-global-override' 2021-05-07 12:47:39 +09:00
gitattributes.txt docs: document symlink restrictions for dot-files 2021-05-04 11:52:03 +09:00
gitcli.txt
gitcore-tutorial.txt
gitcredentials.txt
gitcvs-migration.txt
gitdiffcore.txt
giteveryday.txt
gitfaq.txt
gitglossary.txt
githooks.txt
gitignore.txt docs: .gitignore parsing is to the top of the repo 2021-07-06 17:20:02 -07:00
gitk.txt
gitmailmap.txt docs: document symlink restrictions for dot-files 2021-05-04 11:52:03 +09:00
gitmodules.txt docs: document symlink restrictions for dot-files 2021-05-04 11:52:03 +09:00
gitnamespaces.txt doc lint: lint and fix missing "GIT" end sections 2021-04-10 23:36:34 -07:00
gitremote-helpers.txt
gitrepository-layout.txt
gitrevisions.txt
gitsubmodules.txt
gittutorial-2.txt
gittutorial.txt Documentation: render special characters correctly 2021-07-30 09:08:12 -07:00
gitweb.conf.txt gitweb: add "e-mail privacy" feature to redact e-mail addresses 2021-04-08 15:54:26 -07:00
gitweb.txt
gitworkflows.txt
glossary-content.txt docs: improve fast-forward in glossary content 2021-05-19 21:11:49 +09:00
howto-index.sh
i18n.txt
install-doc-quick.sh
install-webdoc.sh
line-range-format.txt
line-range-options.txt
lint-gitlink.perl doc lint: fix bugs in, simplify and improve lint script 2021-04-10 23:36:34 -07:00
lint-man-end-blurb.perl doc lint: lint and fix missing "GIT" end sections 2021-04-10 23:36:34 -07:00
lint-man-section-order.perl docs: fix linting issues due to incorrect relative section order 2021-04-10 23:36:34 -07:00
Makefile doc: avoid using rm directly 2021-05-24 18:08:22 +09:00
manpage-base-url.xsl.in
manpage-bold-literal.xsl
manpage-normal.xsl
manpage-quote-apos.xsl
manpage.xsl
merge-options.txt Documentation: define 'MERGE_AUTOSTASH' 2021-07-23 15:45:35 -07:00
merge-strategies.txt
MyFirstContribution.txt MyFirstContribution: link #git-devel to Libera Chat 2021-06-09 09:22:54 +09:00
MyFirstObjectWalk.txt
object-format-disclaimer.txt
pretty-formats.txt Merge branch 'ls/typofix' 2021-05-16 21:05:24 +09:00
pretty-options.txt
pull-fetch-param.txt
ref-reachability-filters.txt
rev-list-description.txt
rev-list-options.txt Merge branch 'bc/rev-list-without-commit-line' 2021-07-22 13:05:56 -07:00
revisions.txt revisions(7): clarify that most commands take a single revision range 2021-05-18 10:08:03 +09:00
sequencer.txt
signoff-option.txt
SubmittingPatches SubmittingPatches: replace discussion of Travis with GitHub Actions 2021-07-22 12:53:14 -07:00
texi.xsl
trace2-target-values.txt
transfer-data-leaks.txt
urls-remotes.txt
urls.txt
user-manual.conf
user-manual.txt Merge branch 'ds/gender-neutral-doc' 2021-07-16 17:42:53 -07:00