From dd22bc831a0ec47ecc999eb19be1bd8fad899e9b Mon Sep 17 00:00:00 2001 From: Terry Parker Date: Tue, 2 Jun 2015 19:40:14 -0700 Subject: [PATCH] Update PackWriter.Statistics.getBitmapIndexMises() 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 --- .../src/org/eclipse/jgit/internal/storage/pack/PackWriter.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java index adc6bf11a..85533d6a3 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java @@ -1764,6 +1764,7 @@ private void findObjectsToPack(final ProgressMonitor countingMonitor, countingMonitor.update((int) pack.getObjectCount()); endPhase(countingMonitor); stats.timeCounting = System.currentTimeMillis() - countingStart; + stats.bitmapIndexMisses = -1; } private void findObjectsToPackUsingBitmaps( @@ -2171,6 +2172,7 @@ public long getTotalObjects() { /** * @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 */