Re: [PATCH v2 06/10] commit.c: use generation to halt paint walk

2018-04-11 Thread Derrick Stolee
On 4/10/2018 11:02 PM, Junio C Hamano wrote: Derrick Stolee writes: @@ -800,17 +810,26 @@ static struct commit_list *paint_down_to_common(struct commit *one, int n, struc return result; } prio_queue_put(, one); + if

Re: [PATCH v2 06/10] commit.c: use generation to halt paint walk

2018-04-10 Thread Junio C Hamano
Derrick Stolee writes: > @@ -800,17 +810,26 @@ static struct commit_list *paint_down_to_common(struct > commit *one, int n, struc > return result; > } > prio_queue_put(, one); > + if (one->generation < min_nonstale_gen) > +

[PATCH v2 06/10] commit.c: use generation to halt paint walk

2018-04-09 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,