Re: [PATCH 5/6] commit.c: use generation to halt paint walk

2018-04-03 Thread Jonathan Tan
On Tue, 3 Apr 2018 12:51:42 -0400 Derrick Stolee wrote: > -static int queue_has_nonstale(struct prio_queue *queue) > +static int queue_has_nonstale(struct prio_queue *queue, uint32_t min_gen) > { > - int i; > - for (i = 0; i < queue->nr; i++) { > -

[PATCH 5/6] commit.c: use generation to halt paint walk

2018-04-03 Thread Derrick Stolee
In paint_down_to_common(), the walk is halted when the queue contains only stale commits. The queue_has_nonstale() method iterates over the entire queue looking for a nonstale commit. In a wide commit graph where the two sides share many commits in common, but have deep sets of different commits,