PackWriter: Fix total delta count

The total delta count is supposed to include reused deltas, not
just newly created deltas.

Change-Id: I98cbdcef80d59714a4f62ff322e7b709b08b6d26
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
Shawn O. Pearce 2011-02-22 16:53:22 -08:00
parent 561549d766
commit 977446e5da
1 changed files with 3 additions and 1 deletions

View File

@ -978,8 +978,10 @@ void writeObject(PackOutputStream out, ObjectToPack otp) throws IOException {
out.endObject();
otp.setCRC(out.getCRC32());
stats.reusedObjects++;
if (otp.isDeltaRepresentation())
if (otp.isDeltaRepresentation()) {
stats.totalDeltas++;
stats.reusedDeltas++;
}
return;
} catch (StoredObjectRepresentationNotAvailableException gone) {
if (otp.getOffset() == out.length()) {