Re: [PATCH v2 1/9] t7002: add tests for moving from in-cone to out-of-cone
- From
Shaoxuan Yuan <shaoxuan.yuan02@gmail.com>
- Date
- Aug 9, 2022, 07:53 UTC
- Message-ID
- <399f56dd-b3a7-9510-a45c-9b10a52dea09@gmail.com>
- In-Reply-To
- <bd80881d-b2a3-c220-8f2d-a07a46e14207@github.com>
On 8/9/2022 8:51 AM, Victoria Dye wrote: > There are two other test cases I'd be interested in seeing: > > 1. Move a (clean or dirty) in-cone source file to an out-of-cone destination > *file*. For example: > > echo test >sub/dir/file1 && > git add sub/dir/file1 && > git mv --sparse sub/dir/file1 folder1/file1 > > I'm assuming this should behave the same way as show in 'move clean path > from in-cone to out-of-cone overwrite'.
It's interesting that this test covers an aspect that was not properly considered. When designing in-to-out, I only thought <destination> to be a sparse directory, rather than a possible sparse file, which is a totally valid argument. Hence, all the logics and mechanisms about in-to-out are skipped because Git is completely blind to this file <destination>.
It seems like an easy fix, but I was completely unaware. Thanks for catching this!