Re: [PATCH] grep: provide a noop --recursive option

2018-10-05 Thread Stefan Beller
On Fri, Oct 5, 2018 at 6:05 AM Mischa POSLAWSKY wrote: > > Junio C Hamano wrote 2018-10-05 1:19 (-0700): > > Stefan Beller writes: > > > > > git-grep is always file/tree recursive, but there is --recurse-submodules > > > which is off by default. Instead of providing a short alias to a noop, > >

Re: [PATCH] grep: provide a noop --recursive option

2018-10-05 Thread Mischa POSLAWSKY
Junio C Hamano wrote 2018-10-05 1:19 (-0700): > Stefan Beller writes: > > > git-grep is always file/tree recursive, but there is --recurse-submodules > > which is off by default. Instead of providing a short alias to a noop, > > we could use -r for submodules. (And if you happen to have no > >

Re: [PATCH] grep: provide a noop --recursive option

2018-10-05 Thread Ævar Arnfjörð Bjarmason
On Fri, Oct 05 2018, Junio C Hamano wrote: > René Scharfe writes: > >> >> Recognize -r and --recursive as synonyms for --max-depth=-1 for >> compatibility with GNU grep; it's still the default for git grep. >> >> This also adds --no-recursive as synonym for --max-depth=0 for free, >> which is

Re: [PATCH] grep: provide a noop --recursive option

2018-10-05 Thread Junio C Hamano
Stefan Beller writes: > git-grep is always file/tree recursive, but there is --recurse-submodules > which is off by default. Instead of providing a short alias to a noop, > we could use -r for submodules. (And if you happen to have no > submodules, this is a noop for you) I am not sure if it is

Re: [PATCH] grep: provide a noop --recursive option

2018-10-05 Thread Junio C Hamano
René Scharfe writes: > > Recognize -r and --recursive as synonyms for --max-depth=-1 for > compatibility with GNU grep; it's still the default for git grep. > > This also adds --no-recursive as synonym for --max-depth=0 for free, > which is welcome for completeness and consistency. > > Fix the

Re: [PATCH] grep: provide a noop --recursive option

2018-10-05 Thread Christoph Berg
Re: Stefan Beller 2018-10-01 > git-grep is always file/tree recursive, but there is --recurse-submodules > which is off by default. Instead of providing a short alias to a noop, > we could use -r for submodules. (And if you happen to have no > submodules, this is a noop for you) That would be

Re: [PATCH] grep: provide a noop --recursive option

2018-10-01 Thread Stefan Beller
On Sat, Sep 29, 2018 at 7:55 AM Ævar Arnfjörð Bjarmason wrote: > > This --recursive (-r) option does nothing, and is purely here to > appease people who have "grep -r ..." burned into their muscle memory. > > Requested-by: Christoph Berg > Signed-off-by: Ævar Arnfjörð Bjarmason > --- > > On

Re: [PATCH] grep: provide a noop --recursive option

2018-10-01 Thread René Scharfe
Am 29.09.2018 um 19:11 schrieb Junio C Hamano: > I however do not mind if we added "--recursive" with matching > "--no-recursive", and > > - made "--recursive" the default (obviously) > > - made "--no-recursive" a synonym to setting the recursion limit >to "never recurse" > > - and made

Re: [PATCH] grep: provide a noop --recursive option

2018-09-29 Thread Christoph Berg
Re: Junio C Hamano 2018-09-29 > I also expect folks who are used to "git grep --re" to summon > the only option of the command that begins with that prefix to start > complaining that they now have to type "--recurs" instead. Fwiw I was just asking about -r. There doesn't have to be a

Re: [PATCH] grep: provide a noop --recursive option

2018-09-29 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > This --recursive (-r) option does nothing, and is purely here to > appease people who have "grep -r ..." burned into their muscle memory. > > Requested-by: Christoph Berg > Signed-off-by: Ævar Arnfjörð Bjarmason > --- I personally am not all that sympathetic

Re: [PATCH] grep: provide a noop --recursive option

2018-09-29 Thread Duy Nguyen
On Sat, Sep 29, 2018 at 5:25 PM Ævar Arnfjörð Bjarmason wrote: > > > On Sat, Sep 29 2018, Duy Nguyen wrote: > > > On Sat, Sep 29, 2018 at 4:58 PM Ævar Arnfjörð Bjarmason > > wrote: > >> > >> This --recursive (-r) option does nothing, and is purely here to > >> appease people who have "grep -r

Re: [PATCH] grep: provide a noop --recursive option

2018-09-29 Thread Ævar Arnfjörð Bjarmason
On Sat, Sep 29 2018, Duy Nguyen wrote: > On Sat, Sep 29, 2018 at 4:58 PM Ævar Arnfjörð Bjarmason > wrote: >> >> This --recursive (-r) option does nothing, and is purely here to >> appease people who have "grep -r ..." burned into their muscle memory. > > GNU grep -r recurses infinitely but Git

Re: [PATCH] grep: provide a noop --recursive option

2018-09-29 Thread Duy Nguyen
On Sat, Sep 29, 2018 at 4:58 PM Ævar Arnfjörð Bjarmason wrote: > > This --recursive (-r) option does nothing, and is purely here to > appease people who have "grep -r ..." burned into their muscle memory. GNU grep -r recurses infinitely but Git grep also has --max-depth. How do these interact?

[PATCH] grep: provide a noop --recursive option

2018-09-29 Thread Ævar Arnfjörð Bjarmason
This --recursive (-r) option does nothing, and is purely here to appease people who have "grep -r ..." burned into their muscle memory. Requested-by: Christoph Berg Signed-off-by: Ævar Arnfjörð Bjarmason --- On Sat, Sep 29, 2018 at 4:10 PM Christoph Berg wrote: > > I often use "grep -r