Browse Source

Merge "Fix DeltaTask infinite loop"

stable-3.5
Robin Rosenberg 11 years ago committed by Gerrit Code Review @ Eclipse.org
parent
commit
4dc3ba4327
  1. 2
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaTask.java

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

@ -121,7 +121,7 @@ final class DeltaTask implements Callable<Object> {
ArrayList<WeightedPath> topPaths = computeTopPaths();
Iterator<WeightedPath> topPathItr = topPaths.iterator();
int nextTop = 0;
long weightPerThread = totalWeight / threads;
long weightPerThread = Math.max(totalWeight / threads, 1);
for (int i = beginIndex; i < endIndex;) {
DeltaTask task = new DeltaTask(this);
long w = 0;

Loading…
Cancel
Save