Re: [PATCH] exclude: fix a bug in prefix comparison optimization

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

 



Nguyen Thai Ngoc Duy <pclouds@xxxxxxxxx> writes:

> On Mon, Oct 15, 2012 at 12:36 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
>> With your "teach attr.c match the same optimization as dir.c"
>> series, you would need something like this
>>
>> diff --git i/attr.c w/attr.c
>> index 6d39406..528e935 100644
>> --- i/attr.c
>> +++ w/attr.c
>> @@ -710,7 +710,7 @@ static int path_matches(const char *pathname, int pathlen,
>>          * if the non-wildcard part is longer than the remaining
>>          * pathname, surely it cannot match.
>>          */
>> -       if (!namelen || prefix > namelen)
>> +       if (prefix > namelen)
>>                 return 0;
>>         if (baselen != 0)
>>                 baselen++;
>
> If there's still a chance to rewrite attr-match-optim-more series (I
> see it's in next now), then I could reorder the patches so that
> excluded_from_list code refactoring goes first, then rewrite "teach
> attr.c match... as dir.c" patch makes use of the new functions without
> code duplication. The end result would be the same, except that we
> won't see this bug in attr.c's history. Not much value so if it may
> take a lot of your time, don't bother.

Actually it started to become nuisance to deal with conflicts among
as/check-ignore and the attr/dir/wildmatch series, and I've been
wondering if it makes sense to eject all of these out of 'next' (as
they won't advance beyond 'next' until the next release anyway).

So please go ahead and reroll the whole thing if you think the end
result would be a history with better organization.
--
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]