Use FIFO order for pending queue during RevWalk with no sort order
commit8b867434356b1805cd080eed104b488aed4a67fb
authorShawn O. Pearce <spearce@spearce.org>
Tue, 25 Mar 2008 06:17:06 +0000 (25 02:17 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Mon, 7 Apr 2008 05:06:15 +0000 (7 01:06 -0400)
treea8fa9ff02e1400209618318c28cae28948d06229
parentb23fa871dc18ebaa8095545b9cd4ab3240e221a8
Use FIFO order for pending queue during RevWalk with no sort order

Using LIFO order here is nuts.  We want either FIFO behavior or
commit timestamp behavior.  The commit timestamp is a close estimate
to TOPO, which ensures all children emit before any parent commit.
In practice many projects have commit timestamps ordered such that
there are very few ties or out of order events caused by clock skew.

When using UINTERESTING to flag commits that we don't want we need
to make sure the commits carry through to the parents at a roughly
even rate, so that the uninteresting side branch reaches the merge
base at the same time as the interesting one we are outputting.
If the interesting one runs in LIFO order it could get ahead of
the uninteresting side branch and produce commits we do not want.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.spearce.jgit/src/org/spearce/jgit/revwalk/StartGenerator.java