diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaTask.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaTask.java index 076df1880..42927426b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaTask.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaTask.java @@ -226,7 +226,7 @@ final class DeltaTask implements Callable { } } - private static int getAdjustedWeight(ObjectToPack o) { + static int getAdjustedWeight(ObjectToPack o) { // Edge objects and those with reused deltas do not need to be // compressed. For compression calculations, ignore their weights. if (o.isEdge() || o.doNotAttemptDelta()) { 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 f087aca05..19b6b080d 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 @@ -1306,8 +1306,7 @@ public class PackWriter implements AutoCloseable { long totalWeight = 0; for (int i = 0; i < cnt; i++) { ObjectToPack o = list[i]; - if (!o.isEdge() && !o.doNotAttemptDelta()) - totalWeight += o.getWeight(); + totalWeight += DeltaTask.getAdjustedWeight(o); } long bytesPerUnit = 1;