Re: [RFC PATCH 1/1] mv: integrate with sparse-index
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 21, 2022, 19:14 UTC
- Message-ID
- <xmqq8rt3xgmb.fsf@gitster.g>
- In-Reply-To
- <e127dadb-7b44-55f8-16ea-9fcf94905db8@github.com>
Derrick Stolee <derrickstolee@github.com> writes:
Show 18 quoted lines
>>> Another tool that may help you here is 'git ls-files --sparse -t'. It lists
>>> the files in the index and their "tags" ('H' is "normal" tracked files, 'S'
>>> is SKIP_WORKTREE, etc. [4]), which can help identify when a file you'd
>>> expect to be SKIP_WORKTREE is not and vice versa.
>>
>> Wonderful.
>>
>> Quite honestly, because the code will most likely compile correctly
>> if you just remove the unconditional "we first expand the in-core
>> index fully" code, and because the "sparse index" makes the existing
>> index walking code fail in unexpected and surprising ways, I
>> consider it unsuitably harder for people who are not yet familiar
>> with the system. Without a good test coverage (which is hard to
>> give unless you are familiar with the code being tested X-<), one
>> can easily get confused and lost.
>
> Certainly, 'git mv' is looking to be harder than expected, but there
> is a lot of interesting exploration happening in the process.Yeah, I know.
I am suprised that it is harder than expected *to* *you*, though. After having seen a few other topics, I thought that you should know how deceptively easy to lose "require-full" and how hard to audit the code that may expect "a flat list of paths" in the in-core index ;-).
> Thanks for persisting on this one, Shaoxuan!
Yes, thanks. And thanks for mentoring Shaoxuan.