Re: [BUG] gitignore documentation inconsistent with actual behaviour

2018-10-20 Thread dana
On 20 Oct 2018, at 01:03, Duy Nguyen wrote: >foo**bar would match foobar as well as foo/bar, foo/x/bar and >foo/x/y/bar... Its behavior is error prone in my opinion. There's also >some concerns in early iterations of this "**" support that we would >need to revisit if we want 'rsync' behavior.

Re: [BUG] gitignore documentation inconsistent with actual behaviour

2018-10-20 Thread Duy Nguyen
On Sat, Oct 20, 2018 at 7:53 AM dana wrote: > > On 20 Oct 2018, at 00:26, Duy Nguyen wrote: > >Which way should we go? I'm leaning towards the second one... > > Not sure how much my opinion is worth, but the second option does feel more > friendly (from a usage perspective) as well as more

Re: [BUG] gitignore documentation inconsistent with actual behaviour

2018-10-19 Thread dana
On 20 Oct 2018, at 00:26, Duy Nguyen wrote: >Which way should we go? I'm leaning towards the second one... Not sure how much my opinion is worth, but the second option does feel more friendly (from a usage perspective) as well as more straight-forward (from a re-implementation perspective).

Re: [BUG] gitignore documentation inconsistent with actual behaviour

2018-10-19 Thread Duy Nguyen
On Thu, Oct 11, 2018 at 05:19:06AM -0500, dana wrote: > Hello, > > I'm a contributor to ripgrep, which is a grep-like tool that supports using > gitignore files to control which files are searched in a repo (or any other > directory tree). ripgrep's support for the patterns in these files is

Re: [BUG] gitignore documentation inconsistent with actual behaviour

2018-10-15 Thread Duy Nguyen
On Mon, Oct 15, 2018 at 12:57 AM Junio C Hamano wrote: > > Duy Nguyen writes: > > >> Our matching function comes from rsync originally, whose manpage says: > >> > >> use ’**’ to match anything, including slashes. > >> > >> I believe this is accurate as far as the implementation goes. > > > >

Re: [BUG] gitignore documentation inconsistent with actual behaviour

2018-10-14 Thread Junio C Hamano
Duy Nguyen writes: >> Our matching function comes from rsync originally, whose manpage says: >> >> use ’**’ to match anything, including slashes. >> >> I believe this is accurate as far as the implementation goes. > > No. "**" semantics is not the same as from rsync. The three cases > "**/",

Re: [BUG] gitignore documentation inconsistent with actual behaviour

2018-10-14 Thread Duy Nguyen
On Thu, Oct 11, 2018 at 2:41 PM Ævar Arnfjörð Bjarmason wrote: > > > On Thu, Oct 11 2018, dana wrote: > > > Hello, > > > > I'm a contributor to ripgrep, which is a grep-like tool that supports using > > gitignore files to control which files are searched in a repo (or any other > > directory

Re: [BUG] gitignore documentation inconsistent with actual behaviour

2018-10-13 Thread dana
On 11 Oct 2018, at 06:08, Ævar Arnfjörð Bjarmason wrote: >Our matching function comes from rsync originally, whose manpage says: > > use ’**’ to match anything, including slashes. > >I believe this is accurate as far as the implementation goes. You can >also see the rather exhaustive tests

Re: [BUG] gitignore documentation inconsistent with actual behaviour

2018-10-11 Thread Ævar Arnfjörð Bjarmason
On Thu, Oct 11 2018, dana wrote: > Hello, > > I'm a contributor to ripgrep, which is a grep-like tool that supports using > gitignore files to control which files are searched in a repo (or any other > directory tree). ripgrep's support for the patterns in these files is based on > git's

Re: [BUG] gitignore documentation inconsistent with actual behaviour

2018-10-11 Thread dana
On 11 Oct 2018, at 05:19, dana wrote: >git itself happily accepts these patterns, however, apparently treating the ** >like a single * without fnmatch(3)'s FNM_PATHNAME flag set (in other words, it >matches / as a regular character, thus crossing directory boundaries). Sorry for replying to

[BUG] gitignore documentation inconsistent with actual behaviour

2018-10-11 Thread dana
Hello, I'm a contributor to ripgrep, which is a grep-like tool that supports using gitignore files to control which files are searched in a repo (or any other directory tree). ripgrep's support for the patterns in these files is based on git's official documentation, as seen here: