Merge "PackWriter: Only search for base objects on thin packs"
This commit is contained in:
commit
82e735c3aa
|
@ -1437,6 +1437,7 @@ private void findObjectsToPack(final ProgressMonitor countingMonitor,
|
||||||
}
|
}
|
||||||
commits = null;
|
commits = null;
|
||||||
|
|
||||||
|
if (thin && !baseTrees.isEmpty()) {
|
||||||
BaseSearch bases = new BaseSearch(countingMonitor, baseTrees, //
|
BaseSearch bases = new BaseSearch(countingMonitor, baseTrees, //
|
||||||
objectsMap, edgeObjects, reader);
|
objectsMap, edgeObjects, reader);
|
||||||
RevObject o;
|
RevObject o;
|
||||||
|
@ -1447,11 +1448,19 @@ private void findObjectsToPack(final ProgressMonitor countingMonitor,
|
||||||
int pathHash = walker.getPathHashCode();
|
int pathHash = walker.getPathHashCode();
|
||||||
byte[] pathBuf = walker.getPathBuffer();
|
byte[] pathBuf = walker.getPathBuffer();
|
||||||
int pathLen = walker.getPathLength();
|
int pathLen = walker.getPathLength();
|
||||||
|
|
||||||
bases.addBase(o.getType(), pathBuf, pathLen, pathHash);
|
bases.addBase(o.getType(), pathBuf, pathLen, pathHash);
|
||||||
addObject(o, pathHash);
|
addObject(o, pathHash);
|
||||||
countingMonitor.update(1);
|
countingMonitor.update(1);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
RevObject o;
|
||||||
|
while ((o = walker.nextObject()) != null) {
|
||||||
|
if (o.has(RevFlag.UNINTERESTING))
|
||||||
|
continue;
|
||||||
|
addObject(o, walker.getPathHashCode());
|
||||||
|
countingMonitor.update(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (CachedPack pack : cachedPacks)
|
for (CachedPack pack : cachedPacks)
|
||||||
countingMonitor.update((int) pack.getObjectCount());
|
countingMonitor.update((int) pack.getObjectCount());
|
||||||
|
|
Loading…
Reference in New Issue