Re: What's cooking in git.git (Oct 2012, #01; Tue, 2)

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

 



On 10/04/2012 01:46 PM, Nguyen Thai Ngoc Duy wrote:
> On Thu, Oct 4, 2012 at 4:34 PM, Michael Haggerty <mhagger@xxxxxxxxxxxx> wrote:
>> As for the implementation, it is quite easy to textually convert a glob
>> pattern, including "**" parts, into a regexp.
> 
> Or we could introduce regexp syntax as an alternative and let users
> choose (and pay associated price).

It seems like overkill to me.  For filenames, globs are usually adequate.

>> _filename_char_pattern = r'[^/]'
>> _glob_patterns = [
>>     ('?', _filename_char_pattern),
>>     ('/**', r'(/.+)?'),
>>     ('**/', r'(.+/)?'),
>>     ('*', _filename_char_pattern + r'*'),
>>     ]
> 
> I don't fully understand the rest (never been a big fan of python) but
> what about bracket expressions like [!abc] and [:alnum:]?

You're right; I forgot that the code that I posted doesn't support brackets.

Michael

-- 
Michael Haggerty
mhagger@xxxxxxxxxxxx
http://softwareswirl.blogspot.com/
--
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]