Re: Single brackets matching in .gitignore rules

2015-09-28 Thread Andrey Loskutov
On Monday 28 September 2015 10:40 Junio C Hamano wrote: > Duy Nguyen 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

Re: Single brackets matching in .gitignore rules

2015-09-27 Thread Andrey Loskutov
On Sunday 27 September 2015 10:58 Andreas Schwab wrote: > > ] by itself is not special in a glob. > > Andreas. > OK, this would explain the current state: once Git sees opened bracket, it always tries to parse the glob pattern and if this fails (if the bracket is not closed), the ignore rule

Single brackets matching in .gitignore rules

2015-09-26 Thread Andrey Loskutov
Hi, I'm trying to make JGit .gitignore parser compatible to Git behavior and need help to understand some corner cases. Git seem to fail to match file names if the ignore rule contain a single bracket '[' and seem to have inconsistent behavior for a single ']'. For all experiments below I was