return newPackDesc;
}
- /** @return statistics corresponding to the {@link #getNewPacks()}. */
+ /**
+ * @return statistics corresponding to the {@link #getNewPacks()}.
+ *
+ * <p>The elements can be null if the stat is not available for the pack
+ * file.
+ */
public List<PackStatistics> getNewPackStatistics() {
return newPackStats;
}
ProgressMonitor pm, long estimatedPackSize) throws IOException {
DfsPackDescription pack = repo.getObjectDatabase().newPack(source,
estimatedPackSize);
- newPackDesc.add(pack);
if (source == GC && reftableConfig != null) {
writeReftable(pack);
PackStatistics stats = pw.getStatistics();
pack.setPackStats(stats);
pack.setLastModified(startTimeMillis);
+ newPackDesc.add(pack);
newPackStats.add(stats);
newPackObj.add(pw.getObjectSet());
return pack;
if (reftableConfig != null) {
DfsPackDescription pack = objdb.newPack(GC);
newPackDesc.add(pack);
+ newPackStats.add(null);
writeReftable(pack);
}
}
: Collections.emptyList();
}
- /** @return statistics corresponding to the {@link #getNewPacks()}. */
+ /**
+ * @return statistics corresponding to the {@link #getNewPacks()}.
+ *
+ * <p>The element may be null if the stat is not available.
+ */
public List<PackStatistics> getNewPackStatistics() {
- return newStats != null
+ return outDesc != null
? Collections.singletonList(newStats)
: Collections.emptyList();
}