summaryrefslogtreecommitdiff
path: root/Documentation/git-init.txt
diff options
context:
space:
mode:
authorLibravatar Derrick Stolee <dstolee@microsoft.com>2021-09-08 11:24:00 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-09-09 15:49:05 -0700
commit5d9c9349bd0acda149f37eb1c5edc2a5ef747eea (patch)
tree4f04f768dbda9c12879e75ed88134ab2ec5ffd39 /Documentation/git-init.txt
parentt1092: add cherry-pick, rebase tests (diff)
downloadtgif-5d9c9349bd0acda149f37eb1c5edc2a5ef747eea.tar.xz
sequencer: ensure full index if not ORT strategy
The sequencer is used by 'cherry-pick' and 'rebase' to sequence a list of operations that modify the index. Since we intend to remove the need for 'command_requires_full_index', we need to ensure the sparse index is expanded every time it is written to disk between these steps. That is, unless the merge strategy is 'ort' where the index can remain sparse throughout. There are two main places to be extra careful about a full index: 1. Right before calling merge_trees(), ensure the index is full. This happens within an 'else' where the 'if' block checks if the 'ort' strategy is selected. 2. During read_and_refresh_cache(), the index might be written to disk and converted to sparse in the process. Ensure it expands back to full afterwards by checking if the strategy is _not_ 'ort'. This 'if' statement is the logical negation of the 'if' in item (1). Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Reviewed-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-init.txt')
0 files changed, 0 insertions, 0 deletions