Re: [PATCH v2 1/9] t7002: add tests for moving from in-cone to out-of-cone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/9/2022 10:55 AM, Shaoxuan Yuan wrote:
>> 2. Move a (clean or dirty) in-cone source directory to an out-of-cone
>>     destination where one or more files in <src> overwrite files in <dst>.
>>     For example, something like:
>>
>>     echo test >sub/dir/file1 &&
>>     git add sub/dir/file1 &&
>>     git mv --sparse sub/dir folder1
>>
>>     I don't have a strong opinion on the behavior (does it fail the whole
>>     'mv' operation? move everything except the files that overwrite
>>     something?), but it would help to have it documented via test here.
> OK. I think it will fail the whole `mv` operation. The program will report unspecified > overwrite during the early checking phase. The actual "moving" phase won't be touched
> at all because Git complains early.

No, actually this example does not fail anything. Because
"sub/dir/file1" after the move will be "folder1/dir/file1", and this
move does not involve overwrite at all.

I'm still adding a test case that precisely reflects the main idea
here, though. Thanks for the suggestion :)

--
Thanks,
Shaoxuan




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux