Re: [PATCH 3/8] paint_down_to_common: use prio_queue

2014-07-01 Thread Junio C Hamano
Jeff King p...@peff.net writes: The downside is that our priority queue is not stable, which means that commits with the same timestamp may not come out in the order we put them in. You can see this in the test update in t6024. That test does a recursive merge across a set of commits that

Re: [PATCH 3/8] paint_down_to_common: use prio_queue

2014-07-01 Thread Jeff King
On Tue, Jul 01, 2014 at 09:23:21AM -0700, Junio C Hamano wrote: but with this patch, the positions of B and A are swapped. This is probably fine, as the order is an internal implementation detail anyway (it would _not_ be fine if we were using a priority queue for git log traversal, which

[PATCH 3/8] paint_down_to_common: use prio_queue

2014-06-25 Thread Jeff King
When we are traversing to find merge bases, we keep our usual commit_list of commits to process, sorted by their commit timestamp. As we add each parent to the list, we have to spend O(width of history) to do the insertion, where the width of history is the number of simultaneous lines of