Re: [PATCH v12 5/5] read-cache: speed up has_dir_name (part 2)

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

 





On 7/6/20 2:39 AM, Junio C Hamano wrote:
SZEDER Gábor <szeder.dev@xxxxxxxxx> writes:

+				 * last: xxx/yy-file (because '-' sorts before '/')
+				 * this: xxx/yy/abc

This is problematic, because the index can already contain 'xxx/yy' as
a file, when adding 'xxx/yy/abc', but since 'xxx/yy' as a file sorts
before 'xxx/yy-file', the short-circuiting here doesn't see it and
thus leaves the d-f collision undetected.  Consequently, even Git
porcelain commands can create tree objects with duplicate entries, as
demonstrated in the tests below.

Yeah, the "optimization" is quite bogus.  Thanks for catching it.


yes, thanks!
Jeff



[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