Re: [msysGit] Re: [PATCH] git tag --contains : avoid stack overflow

2012-11-12 Thread Johannes Schindelin
Hi Peff, On Mon, 12 Nov 2012, Jeff King wrote: On Mon, Nov 12, 2012 at 11:27:14PM +0100, Jean-Jacques Lafay wrote: 2012/11/11 Jeff King p...@peff.net: On Sun, Nov 11, 2012 at 05:46:32PM +0100, René Scharfe wrote: Ultimately, I have some ideas for doing this in a breadth-first way,

Re: [msysGit] Re: [PATCH] git tag --contains : avoid stack overflow

2012-11-12 Thread Jeff King
On Tue, Nov 13, 2012 at 01:16:01AM +, Johannes Schindelin wrote: We can do much better than O(number of commits), though, if we stop traversing down a path when its timestamp shows that it is too old to contain the commits we are searching for. The problem is that the timestamps

Re: [msysGit] Re: [PATCH] git tag --contains : avoid stack overflow

2012-11-12 Thread Johannes Schindelin
Hi Peff, On Mon, 12 Nov 2012, Jeff King wrote: On Tue, Nov 13, 2012 at 01:16:01AM +, Johannes Schindelin wrote: We can do much better than O(number of commits), though, if we stop traversing down a path when its timestamp shows that it is too old to contain the commits we are

Re: [msysGit] Re: [PATCH] git tag --contains : avoid stack overflow

2012-11-12 Thread Jeff King
On Tue, Nov 13, 2012 at 04:01:11AM +, Johannes Schindelin wrote: Note that name-rev will produce wrong answers in the face of clock skew. And I think that you even wrote that code. :) IIRC the cute code to short-circuit using the date is not from me. If it is, I am very ashamed.

Re: [msysGit] Re: [PATCH] git tag --contains : avoid stack overflow

2012-11-12 Thread Junio C Hamano
Jeff King p...@peff.net writes: Yeah. We tolerate a certain amount of skew (24 hours for --name-rev, and 5 broken commits in a row for --since). But the big ones are usually software bugs (the big kernel ones were from broken guilt, I think) or broken imports (when I published a bunch of skew

Re: [msysGit] Re: [PATCH] git tag --contains : avoid stack overflow

2012-11-12 Thread Johannes Schindelin
Hi Peff, On Mon, 12 Nov 2012, Jeff King wrote: On Tue, Nov 13, 2012 at 04:01:11AM +, Johannes Schindelin wrote: Note that name-rev will produce wrong answers in the face of clock skew. And I think that you even wrote that code. :) IIRC the cute code to short-circuit using the

Re: [msysGit] Re: [PATCH] git tag --contains : avoid stack overflow

2012-11-12 Thread Jeff King
On Mon, Nov 12, 2012 at 08:51:37PM -0800, Junio C Hamano wrote: Jeff King p...@peff.net writes: Yeah. We tolerate a certain amount of skew (24 hours for --name-rev, and 5 broken commits in a row for --since). But the big ones are usually software bugs (the big kernel ones were from

Re: [msysGit] Re: [PATCH] git tag --contains : avoid stack overflow

2012-11-11 Thread Johannes Schindelin
Hi, On Sun, 11 Nov 2012, Jeff King wrote: On Sun, Nov 11, 2012 at 05:46:32PM +0100, René Scharfe wrote: However, I couldn't reproduce it on Linux : where the windows implementations crashes at a ~32000 depth (*not* exactly 32768, mind you), on linux it happily went through 10