Previously, the DfsPackCompactor exited without pruning the existing packs, when no new packs were created. Change-Id: I5e3b6f8c789706c7a982e6ae93cf7c3d4346797ctags/v3.1.0.201309270735-rc1
pw.setReuseDeltaCommits(false); | pw.setReuseDeltaCommits(false); | ||||
addObjectsToPack(pw, ctx, pm); | addObjectsToPack(pw, ctx, pm); | ||||
if (pw.getObjectCount() == 0) | |||||
if (pw.getObjectCount() == 0) { | |||||
List<DfsPackDescription> remove = toPrune(); | |||||
if (remove.size() > 0) | |||||
objdb.commitPack( | |||||
Collections.<DfsPackDescription>emptyList(), | |||||
remove); | |||||
return; | return; | ||||
} | |||||
boolean rollback = true; | boolean rollback = true; | ||||
DfsPackDescription pack = objdb.newPack(COMPACT); | DfsPackDescription pack = objdb.newPack(COMPACT); |