git/Documentation/technical
Derrick Stolee 839a66349e sparse-index: API protection strategy
Edit and expand the sparse-index design document with the plan for
guarding index operations with ensure_full_index().

Notably, the plan has changed to not have an expand_to_path() method in
favor of checking for a sparse-directory hit inside of the
index_path_pos() API.

The changes that follow this one will incrementally add
ensure_full_index() guards to iterations over all cache entries. Some
iterations over the cache entries are not protected due to a few
categories listed in the document. Since these are not being modified,
here is a short list of the files and methods that will not receive
these guards:

Looking for non-zero stage:
* builtin/add.c:chmod_pathspec()
* builtin/merge.c:count_unmerged_entries()
* merge-ort.c:record_conflicted_index_entries()
* read-cache.c:unmerged_index()
* rerere.c:check_one_conflict(), find_conflict(), rerere_remaining()
* revision.c:prepare_show_merge()
* sequencer.c:append_conflicts_hint()
* wt-status.c:wt_status_collect_changes_initial()

Looking for submodules:
* builtin/submodule--helper.c:module_list_compute()
* submodule.c: several methods
* worktree.c:validate_no_submodules()

Part of the index API:
* name-hash.c: lazy init methods
* preload-index.c:preload_thread(), preload_index()
* read-cache.c: file format methods

Checking for correct order of cache entries:
* read-cache.c:check_ce_order()

Ignores SKIP_WORKTREE entries or already aware:
* unpack-trees.c:mark_new_skip_worktree()
* wt-status.c:wt_status_check_sparse_checkout()

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-04-14 13:45:34 -07:00
..
.gitignore
api-error-handling.txt
api-index-skel.txt
api-index.sh
api-merge.txt
api-parse-options.txt
api-trace2.txt
bitmap-format.txt
bundle-format.txt
chunk-format.txt chunk-format: add technical docs 2021-02-18 13:38:16 -08:00
commit-graph-format.txt chunk-format: add technical docs 2021-02-18 13:38:16 -08:00
commit-graph.txt
directory-rename-detection.txt
hash-function-transition.txt
http-protocol.txt
index-format.txt sparse-index: add 'sdir' index extension 2021-03-30 12:57:46 -07:00
long-running-process-protocol.txt
multi-pack-index.txt
pack-format.txt Merge branch 'ds/chunked-file-api' 2021-03-01 14:02:57 -08:00
pack-heuristics.txt
pack-protocol.txt
packfile-uri.txt
partial-clone.txt
protocol-capabilities.txt
protocol-common.txt
protocol-v2.txt Merge branch 'js/doc-proto-v2-response-end' 2021-02-25 16:43:30 -08:00
racy-git.txt
reftable.txt doc/reftable: document how to handle windows 2021-02-23 10:01:21 -08:00
repository-version.txt
rerere.txt
send-pack-pipeline.txt
shallow.txt
signature-format.txt
sparse-index.txt sparse-index: API protection strategy 2021-04-14 13:45:34 -07:00
trivial-merge.txt