Re: [PATCH v3 2/4] path: optimize common dir checking

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

 



On Sun, Aug 16, 2015 at 12:04 PM, David Turner <dturner@xxxxxxxxxxxxxxxx> wrote:
> Duy Nguyen <pclouds@xxxxxxxxx> writes:
>> On Thu, Aug 13, 2015 at 4:57 AM, David Turner <dturner@xxxxxxxxxxxxxxxx>
> wrote:
>> > Instead of a linear search over common_list to check whether
>> > a path is common, use a trie.  The trie search operates on
>> > path prefixes, and handles excludes.
>>
>> Just be careful that the given key from git_path is not normalized. I
>> think you assume it is in the code, but I haven't read carefully. We
>> could of course optimize for the good case: assume normalized and
>> search, then fall back to explicit normalizing and search again.
>
> What does it mean for a key to be normalized?  Do you mean normalized in
> terms of upper/lowercase on case-insensitive filesystems?  If so, I think the
> assumption here is that this will be called with paths generated by git,
> which will always use the lowercase path.

Mostly about duplicated slashes, "abc//def" instead of "abc/def".
Technically nothing forbids git_path("refs/../refs/foo"), but that
would fool even current code.
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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]