Re: [ENHANCEMENT] Allow '**' pattern in .gitignore
- From
Jens Lehmann <jens.lehmann@web.de>
- Date
- Oct 3, 2012, 13:51 UTC
- Message-ID
- <506C42CB.90903@web.de>
- In-Reply-To
- <CACsJy8DRxbjcRpbO30vOCo9D+TK_dDX_oiocZSOtnGAR2jAOFw@mail.gmail.com>
Am 03.10.2012 15:42, schrieb Nguyen Thai Ngoc Duy:
Show 10 quoted lines
> On Wed, Oct 3, 2012 at 8:35 PM, Jens Lehmann <Jens.Lehmann@web.de> wrote: >> */foo/bar >> */*/foo/bar >> */*/*/foo/bar >> >> Using "**/foo/bar" instead would be a great improvement > > If this "**/foo/bar" (i.e. no wildcards except one ** at the > beginning) is popular, we could optimize this case, turning fmatch() > into strncmp(), just like what we do for "foobar*"
I expect the logic "ignore <pattern including a slash> in any directory depth you find it" to be one of the major use cases for "**", so I think optimization makes sense here.