Browse Source

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 <tparker@google.com>
stable-4.1
Terry Parker 10 years ago committed by Shawn Pearce
parent
commit
dd22bc831a
  1. 2
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java

2
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java

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

Loading…
Cancel
Save