Re: [PATCH 1/4] magic pathspec: add tentative ":/path/from/top/level" pathspec support

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

 



On Fri, Apr 8, 2011 at 1:28 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Nguyen Thai Ngoc Duy <pclouds@xxxxxxxxx> writes:
>
>> 2011/4/7 Junio C Hamano <gitster@xxxxxxxxx>:
>>> + Â Â Â Â Â Â Â Â Â Â Â if (('a' <= ch && ch <= 'z') ||
>>> + Â Â Â Â Â Â Â Â Â Â Â Â Â ('A' <= ch && ch <= 'Z')) {
>>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â strbuf_addf(&sb, "[%c%c]",
>>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â tolower(ch), toupper(ch));
>>
>> Nice try. You know you are going to pay a high performance price for
>> that, don't you ;) Maybe also worth mentioning in document that this
>> applies to ASCII charset only (as opposed to Unicode).
>
> You know this is a throw-away patch, just to illustrate that some things
> are doable with a hack to add more code to get_pathspec(), while others
> would need a bigger restructuring, don't you?
>
> Besides, _if_ the user wants to do something costly, as long as the
> implementation does not harm common cases, it _still_ is better to make
> the code do the work, no?

I was thinking of the latter rather than the former. And I agree. Just
wondering how slow it (fnmatch in general) can be compared to plain
prefix. I guess we will know soon if this patch gets in and users
start to use it.
-- 
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]