Re: Single brackets matching in .gitignore rules

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

 



Andrey Loskutov <loskutov@xxxxxx> writes:

> On Monday 28 September 2015 10:40 Junio C Hamano wrote:
>> Duy Nguyen <pclouds@xxxxxxxxx> writes:
>> 
>> > This is already answered. I just want to add that C Git has stopped
>> > using system fnmatch for some time (part of the reason is system
>> > fnmatch behaves differently in corner cases). If you don't mind C,
>> > have a look at dowild() in wildmatch.c, or t/t3070-wildmatch.sh for
>> > some corner cases (but your cases aren't there, may be worth adding
>> > too)
>> 
>> What exactly are you suggesting to "fix", though?  Barf when an
>> unmatched ] appears as a part of the pattern, instead of taking it
>> literally?
>
> I would rather treat the opened but unmatched [ bracket literally, so
> that it works similar like ].

Ah, OK.  As long as the (broken) pattern '[' has never been
accepted, it is safe to assume that no working .gitignore file
people have should contain such a string and relying that it
does not match anything, I guess.


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