Re: [PATCH 5/6] gitignore: do not do basename match with patterns that have '**'

2012-10-05 Thread Nguyen Thai Ngoc Duy
On Fri, Oct 5, 2012 at 2:01 PM, Johannes Sixt wrote: > Am 10/4/2012 9:39, schrieb Nguyễn Thái Ngọc Duy: >> - - If the pattern does not contain a slash '/', git treats it as >> - a shell glob pattern and checks for a match against the >> - pathname relative to the location of the `.gitignore` f

Re: [PATCH 5/6] gitignore: do not do basename match with patterns that have '**'

2012-10-05 Thread Johannes Sixt
Am 10/4/2012 9:39, schrieb Nguyễn Thái Ngọc Duy: > - - If the pattern does not contain a slash '/', git treats it as > - a shell glob pattern and checks for a match against the > - pathname relative to the location of the `.gitignore` file > - (relative to the toplevel of the work tree if not

Re: [PATCH 5/6] gitignore: do not do basename match with patterns that have '**'

2012-10-04 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > - if (!strchr(p, '/')) > + if (!strchr(p, '/') && !strstr(p, "**")) Doesn't wildmatch allow these to be quoted, similar to the way usual glob works, e.g. $ >ff $ >\?f $ echo ?? ?f ff $ echo \?f