private int objectsBefore() { int cnt = 0; for (DfsPackFile p : packsBefore) cnt += p.getPackDescription().getObjectCount(); return cnt; }
/** {@inheritDoc} */ @Override public long getObjectCount() throws IOException { return getPackDescription().getObjectCount(); }
return Long.signum(a.getObjectCount() - b.getObjectCount()); });
private void verifyPack(ProgressMonitor pm, FsckError errors, DfsReader ctx, DfsPackFile pack, ReadableChannel ch) throws IOException, CorruptPackIndexException { FsckPackParser fpp = new FsckPackParser(objdb, ch); fpp.setObjectChecker(objChecker); fpp.overwriteObjectCount(pack.getPackDescription().getObjectCount()); fpp.parse(pm); errors.getCorruptObjects().addAll(fpp.getCorruptObjects()); fpp.verifyIndex(pack.getPackIndex(ctx)); }
private int objectsBefore() { int cnt = 0; for (DfsPackFile p : packsBefore) cnt += p.getPackDescription().getObjectCount(); return cnt; }
private int objectsBefore() { int cnt = 0; for (DfsPackFile p : packsBefore) cnt += p.getPackDescription().getObjectCount(); return cnt; }
/** {@inheritDoc} */ @Override public long getObjectCount() throws IOException { return getPackDescription().getObjectCount(); }
@Override public long getObjectCount() throws IOException { return getPackDescription().getObjectCount(); }
/** * Sort packs according to the optimal lookup ordering. * <p> * This method tries to position packs in the order readers should examine * them when looking for objects by SHA-1. The default tries to sort packs * with more recent modification dates before older packs, and packs with * fewer objects before packs with more objects. * * @param b * the other pack. */ public int compareTo(DfsPackDescription b) { // Cluster by PackSource, pushing UNREACHABLE_GARBAGE to the end. PackSource as = getPackSource(); PackSource bs = b.getPackSource(); if (as != null && bs != null) { int cmp = as.category - bs.category; if (cmp != 0) return cmp; } // Newer packs should sort first. int cmp = Long.signum(b.getLastModified() - getLastModified()); if (cmp != 0) return cmp; // Break ties on smaller index. Readers may get lucky and find // the object they care about in the smaller index. This also pushes // big historical packs to the end of the list, due to more objects. return Long.signum(getObjectCount() - b.getObjectCount()); }
return Long.signum(a.getObjectCount() - b.getObjectCount()); });
private void verifyPack(ProgressMonitor pm, FsckError errors, DfsReader ctx, DfsPackFile pack, ReadableChannel ch) throws IOException, CorruptPackIndexException { FsckPackParser fpp = new FsckPackParser(objdb, ch); fpp.setObjectChecker(objChecker); fpp.overwriteObjectCount(pack.getPackDescription().getObjectCount()); fpp.parse(pm); errors.getCorruptObjects().addAll(fpp.getCorruptObjects()); fpp.verifyIndex(pack.getPackIndex(ctx)); }