Re: [PATCH 2/7] sparse-index: update command for expand/collapse test
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 1, 2021, 00:04 UTC
- Message-ID
- <xmqqr1d58v9x.fsf@gitster.g>
- In-Reply-To
- <e6049a17-c721-c596-51a6-101cb6065829@github.com>
Victoria Dye <vdye@github.com> writes:
Show 13 quoted lines
>> Do we need to update this further when "mv a b" >> learns to expand and then collapse? > > Unfortunately, yes. `git mv` was picked more-or-less at random from the set > of commands that read the index and don't already have sparse index > integrations (excluding those I know are planned for sparse index > integration in the near future). If `git mv` were to be updated to disable > `command_requires_full_index`, the command in the test would need to change > again. > > For what it's worth, I do think the test itself is valuable, since it makes > sure a command's capability to use the sparse index is always the result of > an intentional update to (and review of) the code.
Oh, of course.
I was actually wondering if it woudl be a good idea to leave a command that will never be "converted" so that we can keep using it for testing.
Perhaps a new option that is invented exactly for the purpose added to a plumbing e.g. "git update-index --expand-collapse"?