]> source.dussan.org Git - jgit.git/commitdiff
Update PackWriter.Statistics.getBitmapIndexMises() 89/49289/2
authorTerry Parker <tparker@google.com>
Wed, 3 Jun 2015 02:40:14 +0000 (19:40 -0700)
committerShawn Pearce <spearce@spearce.org>
Wed, 3 Jun 2015 02:49:55 +0000 (22:49 -0400)
Return -1 from PackWriter.Statistics.getBitmapIndexMises() when no
bitmap indices were found, to differentiate it from the case where
the bitmap indices contained all of the want/have commits.

Change-Id: I78d4600b462c19f62b347217a0b2c19eaaf3a14b
Signed-off-by: Terry Parker <tparker@google.com>
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java

index adc6bf11ab36f1c4babe68b99bda49c61fa0db43..85533d6a33215eb533a8ff445d28d57587b3f6f5 100644 (file)
@@ -1764,6 +1764,7 @@ public class PackWriter implements AutoCloseable {
                        countingMonitor.update((int) pack.getObjectCount());
                endPhase(countingMonitor);
                stats.timeCounting = System.currentTimeMillis() - countingStart;
+               stats.bitmapIndexMisses = -1;
        }
 
        private void findObjectsToPackUsingBitmaps(
@@ -2171,6 +2172,7 @@ public class PackWriter implements AutoCloseable {
                /**
                 * @return the count of objects that needed to be discovered through an
                 *         object walk because they were not found in bitmap indices.
+                *         Returns -1 if no bitmap indices were found.
                 *
                 * @since 4.0
                 */