Re: [PATCH v2 1/1] git mv foo FOO ; git mv foo bar gave an assert

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

 



Chris Torek <chris.torek@xxxxxxxxx> writes:

> On Mon, Mar 1, 2021 at 11:26 AM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>> Before the problematic patch, this used to be
>>
>>                } else if (cache_name_pos(src, length) < 0)
>>
>> I wonder if we should revert the change to use cache_file_exists()
>> in the first place (and rewrite the subsequent use of ce to match),
>> though.
>
> For what it's worth, that was what I did originally; the change
> to look up the ce "up front" was because someone objected to the
> double search implied by calling cache_name_pos once, then
> cache_file_exists to determine the correct error message...

cache_name_pos() bypasses the name-hash altogether because it won't
need case insensitive search at all, so the comparison is apples and
oranges.  The use of cache_file_exists() made sense if ignore_case
is wanted, but since with the "fix", we always match case
sensitively, I would suspect that it would start making sense to use
cache_name_pos() to grab exactly the ce we want.

Thanks.



[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