PackWriter: Correct total delta count when reusing pack
If the CachedPack knows its delta count, we need to increment both the totalDeltas and reusedDeltas fields of the stats object. Change-Id: I70113609c22476ce7f1e4d9a92f486e9b0f59e44 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
parent
4275c4c1cf
commit
388ba7e005
|
@ -587,8 +587,10 @@ public void writePack(ProgressMonitor compressMonitor,
|
|||
stats.thinPackBytes = out.length() - (headerEnd - headerStart);
|
||||
|
||||
for (CachedPack pack : cachedPacks) {
|
||||
long deltaCnt = pack.getDeltaCount();
|
||||
stats.reusedObjects += pack.getObjectCount();
|
||||
stats.reusedDeltas += pack.getDeltaCount();
|
||||
stats.reusedDeltas += deltaCnt;
|
||||
stats.totalDeltas += deltaCnt;
|
||||
reuseSupport.copyPackAsIs(out, pack);
|
||||
}
|
||||
writeChecksum(out);
|
||||
|
|
Loading…
Reference in New Issue