]> source.dussan.org Git - jgit.git/commitdiff
Fix while boundries in DateRevQueue.add() 26/10626/1
authorGustaf Lundh <gustaf.lundh@sonymobile.com>
Mon, 25 Feb 2013 17:24:16 +0000 (18:24 +0100)
committerGustaf Lundh <gustaf.lundh@sonymobile.com>
Mon, 25 Feb 2013 17:30:03 +0000 (18:30 +0100)
In add(), "low" will never equals "first". This fact
should be reflected in the code.

Change-Id: I5cab51374e67bd2d3301e5d9dac47c4259b5e562

org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DateRevQueue.java

index 2c46f8eb4773bf5eb4385b20a9174a108266fed9..0802bfafdeee818edd269b1dd96407a2b89f329d 100644 (file)
@@ -106,7 +106,7 @@ public class DateRevQueue extends AbstractRevQueue {
                                }
                        }
                        low = Math.min(low, high);
-                       while (low >= first && when == index[low].commit.commitTime)
+                       while (low > first && when == index[low].commit.commitTime)
                                --low;
                        q = index[low];
                }