Re: [PATCH 12/19] tree_entry_interesting(): support wildcard matching

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

 



2010/12/14 Junio C Hamano <gitster@xxxxxxxxx>:
> Nguyán ThÃi Ngác Duy Â<pclouds@xxxxxxxxx> writes:
>
>> Signed-off-by: Nguyán ThÃi Ngác Duy <pclouds@xxxxxxxxx>
>> ---
>> Âtree-walk.c | Â 33 ++++++++++++++++++++++++++++++---
>> Âtree-walk.h | Â Â2 +-
>> Â2 files changed, 31 insertions(+), 4 deletions(-)
>
> ;-) ÂLooks almost too easy.

Much better, yes. I went the wrong way and allowed wildcards in
directory matching too. It turned tree_entry_interesting() into hell.

>> + Â Â Â Â Â Â never_interesting = 0;
>
> When we have wildcard we would want to disable the never-interesting
> optimization, but I wonder if doing so only when we do not have exact hit
> is what we want. ÂIf a sick person had a path "a?b" tracked, and asked to
> match a pathspec "a?b", don't we still want to say "'a?b' of course
> matches, but 'a1b' ('1' comes earlier than '?' in the sort order) and
> 'aAb' ('A' comes later) also match"?

Heck, yeah. Easier for me though, just put this at top :-)

int never_interesting = ps->has_wildcard ? 0 : -1;
-- 
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]