Re: [PATCH 2/7] sparse-index: update command for expand/collapse test
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 30, 2021, 21:32 UTC
- Message-ID
- <xmqqk0ixagw8.fsf@gitster.g>
- In-Reply-To
- <6e9843d5-bc04-e69c-9e53-7bf18ca30fc8@github.com>
Victoria Dye <vdye@github.com> writes:
Show 20 quoted lines
> Taylor Blau wrote: >> On Thu, Sep 30, 2021 at 02:50:56PM +0000, Victoria Dye via GitGitGadget wrote: >>> From: Victoria Dye <vdye@github.com> >>> >>> In anticipation of multiple commands being fully integrated with sparse >>> index, update the test for index expand and collapse for non-sparse index >>> integrated commands to use `mv`. >>> ... >>> GIT_TRACE2_EVENT="$(pwd)/trace2.txt" GIT_TRACE2_EVENT_NESTING=10 \ >>> - git -C sparse-index -c core.fsmonitor="" reset --hard && >>> + git -C sparse-index -c core.fsmonitor="" mv a b && >> >> Double-checking my understanding as somebody who is not so familiar with >> t1092: this test is to ensure that commands which don't yet understand >> the sparse index can temporarily expand it in order to do their work? > > Exactly - if a command doesn't explicitly enable use of the sparse index by > setting `command_requires_full_index` to 0, the index is expanded if/when it > is first read during the command's execution and collapsed if/when it is > written to disk. This test makes sure that mechanism works as intended.
Sorry, I do not quite follow.
So is this "before this series of patches, 'reset --hard' can be used to as a sample of a command that expands and then collapses, but because it no longer is a good sample of a command so we replace it with 'mv a b'"? Do we need to update this further when "mv a b" learns to expand and then collapse?