Re: [PATCH 2/7] sparse-index: update command for expand/collapse test
- From
Victoria Dye <vdye@github.com>
- Date
- Oct 4, 2021, 13:47 UTC
- Message-ID
- <a1722c44-9788-0700-3d76-4199369d1c9f@github.com>
- In-Reply-To
- <xmqqr1d58v9x.fsf@gitster.g>
Junio C Hamano wrote:
Show 25 quoted lines
> Victoria Dye <vdye@github.com> writes: > >>> 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"? >
That sounds good to me! I'll add an `update-index --expand-collapse` implementation and update the test in v2 of this series.