Re: [ENHANCEMENT] Allow '**' pattern in .gitignore

2012-10-03 Thread Nguyen Thai Ngoc Duy
On Wed, Oct 3, 2012 at 8:35 PM, Jens Lehmann 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(

Re: [ENHANCEMENT] Allow '**' pattern in .gitignore

2012-10-03 Thread Jens Lehmann
Am 03.10.2012 13:35, schrieb Nguyen Thai Ngoc Duy: > On Tue, Oct 2, 2012 at 3:24 PM, Ramkumar Ramachandra > wrote: >> Stefano Lattarini wrote: >>> On 10/02/2012 09:21 AM, Ramkumar Ramachandra wrote: Hi, I've often found the '**' (extended) shell glob useful for matching any st

Re: [ENHANCEMENT] Allow '**' pattern in .gitignore

2012-10-03 Thread Nguyen Thai Ngoc Duy
On Tue, Oct 2, 2012 at 3:24 PM, Ramkumar Ramachandra wrote: > Stefano Lattarini wrote: >> On 10/02/2012 09:21 AM, Ramkumar Ramachandra wrote: >>> Hi, >>> >>> I've often found the '**' (extended) shell glob useful for matching >>> any string crossing directory boundaries: it's especially useful if

Re: [ENHANCEMENT] Allow '**' pattern in .gitignore

2012-10-02 Thread Ramkumar Ramachandra
Stefano Lattarini wrote: > On 10/02/2012 09:21 AM, Ramkumar Ramachandra wrote: >> Hi, >> >> I've often found the '**' (extended) shell glob useful for matching >> any string crossing directory boundaries: it's especially useful if >> you only have a toplevel .gitignore, as opposed to a per-director

Re: [ENHANCEMENT] Allow '**' pattern in .gitignore

2012-10-02 Thread Stefano Lattarini
On 10/02/2012 09:21 AM, Ramkumar Ramachandra wrote: > Hi, > > I've often found the '**' (extended) shell glob useful for matching > any string crossing directory boundaries: it's especially useful if > you only have a toplevel .gitignore, as opposed to a per-directory > .gitignore. Unfortunately,

[PATCH 5/5] Support "**" in .gitignore and .gitattributes patterns using wildmatch()

2012-09-26 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- Documentation/gitignore.txt| 3 +++ attr.c | 4 +++- dir.c | 5 - t/t0003-attributes.sh | 17 + t/t3001-ls-files-others-exclu

Re: /* in .gitignore

2012-09-25 Thread Hilco Wijbenga
On 25 September 2012 16:13, Junio C Hamano wrote: > Hilco Wijbenga writes: > >> Naturally, this behaviour makes perfect sense: "/*" means everything. >> Still, I was wondering whether it might be a good idea to make an >> exception for '.gitignore' itself? Then if somebody *really* wanted to >> i

Re: /* in .gitignore

2012-09-25 Thread Junio C Hamano
Hilco Wijbenga writes: > Naturally, this behaviour makes perfect sense: "/*" means everything. > Still, I was wondering whether it might be a good idea to make an > exception for '.gitignore' itself? Then if somebody *really* wanted to > ignore '.gitignore' they could add "/.gitignore" to '.gitig

[PATCH v2 5/5] Support "**" in .gitignore and .gitattributes patterns using wildmatch()

2012-09-16 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/gitignore.txt| 3 +++ attr.c | 4 +++- dir.c | 5 - t/t0003-attributes.sh | 17 + t/t3001-ls-files-others-exclude.sh | 11 +++ 5 file

[PATCH 5/5] Support "**" in .gitignore and .gitattributes patterns using wildmatch()

2012-09-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/gitignore.txt | 3 +++ attr.c | 4 +++- dir.c | 5 - 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt index c1f692a..eb81d

<    1   2