Re: [PATCH] die routine: change recursion limit from 1 to 1024

2017-06-21 Thread Ævar Arnfjörð Bjarmason
On Wed, Jun 21 2017, Simon Ruderich jotted: > On Tue, Jun 20, 2017 at 08:49:59PM +0200, Ævar Arnfjörð Bjarmason wrote: >> If I understand you correctly this on top: >> >> diff --git a/usage.c b/usage.c >> index 1c198d4882..f6d5af2bb4 100644 >> --- a/usage.c >> +++ b/usage.c >>

Re: [PATCH] die routine: change recursion limit from 1 to 1024

2017-06-21 Thread Simon Ruderich
On Tue, Jun 20, 2017 at 08:49:59PM +0200, Ævar Arnfjörð Bjarmason wrote: > If I understand you correctly this on top: > > diff --git a/usage.c b/usage.c > index 1c198d4882..f6d5af2bb4 100644 > --- a/usage.c > +++ b/usage.c > @@ -46,7 +46,19 @@ static int

Re: [PATCH] die routine: change recursion limit from 1 to 1024

2017-06-20 Thread Jeff King
On Tue, Jun 20, 2017 at 08:49:59PM +0200, Ævar Arnfjörð Bjarmason wrote: > As you can see the third most common case is that we needlessly print > out the warning, i.e. we have only one error anyway, but we can't > guarantee that, so it probably makes sense to emit it. Right, my suggestion

Re: [PATCH] die routine: change recursion limit from 1 to 1024

2017-06-20 Thread Ævar Arnfjörð Bjarmason
On Tue, Jun 20 2017, Jeff King jotted: > On Mon, Jun 19, 2017 at 10:00:36PM +, Ævar Arnfjörð Bjarmason wrote: > >> Change the recursion limit for the default die routine from a *very* >> low 1 to 1024. This ensures that infinite recursions are broken, but >> doesn't lose error messages. >>

Re: [PATCH] die routine: change recursion limit from 1 to 1024

2017-06-20 Thread Jeff King
On Tue, Jun 20, 2017 at 11:54:59AM -0400, Jeff King wrote: > > Now, git-grep could make use of the pluggable error facility added in > > commit c19a490e37 ("usage: allow pluggable die-recursion checks", > > 2013-04-16). > > Yeah, I think this is a bug in git-grep and should be fixed, independent

Re: [PATCH] die routine: change recursion limit from 1 to 1024

2017-06-20 Thread Jeff King
On Mon, Jun 19, 2017 at 10:00:36PM +, Ævar Arnfjörð Bjarmason wrote: > Change the recursion limit for the default die routine from a *very* > low 1 to 1024. This ensures that infinite recursions are broken, but > doesn't lose error messages. > > The intent of the existing code, as explained

Re: [PATCH] die routine: change recursion limit from 1 to 1024

2017-06-19 Thread Stefan Beller
On Mon, Jun 19, 2017 at 3:32 PM, Ævar Arnfjörð Bjarmason wrote: > > On Mon, Jun 19 2017, Stefan Beller jotted: > >>> Now, git-grep could make use of the pluggable error facility added in >>> commit c19a490e37 ("usage: allow pluggable die-recursion checks", >>> 2013-04-16). >> >>

Re: [PATCH] die routine: change recursion limit from 1 to 1024

2017-06-19 Thread Ævar Arnfjörð Bjarmason
On Mon, Jun 19 2017, Stefan Beller jotted: >> Now, git-grep could make use of the pluggable error facility added in >> commit c19a490e37 ("usage: allow pluggable die-recursion checks", >> 2013-04-16). > > I think we should do that instead (though I have not looked at the downsides > of this),

Re: [PATCH] die routine: change recursion limit from 1 to 1024

2017-06-19 Thread Stefan Beller
> Now, git-grep could make use of the pluggable error facility added in > commit c19a490e37 ("usage: allow pluggable die-recursion checks", > 2013-04-16). I think we should do that instead (though I have not looked at the downsides of this), because... > > So let's just set the recursion limit to

[PATCH] die routine: change recursion limit from 1 to 1024

2017-06-19 Thread Ævar Arnfjörð Bjarmason
Change the recursion limit for the default die routine from a *very* low 1 to 1024. This ensures that infinite recursions are broken, but doesn't lose error messages. The intent of the existing code, as explained in commit cd163d4b4e ("usage.c: detect recursion in die routines and bail out