private void resolveImpl(PackList packList, AbbreviatedObjectId id, HashSet<ObjectId> matches) throws IOException { for (DfsPackFile pack : packList.packs) { if (skipGarbagePack(pack)) { continue; } pack.resolve(this, matches, id, MAX_RESOLVE_MATCHES); if (matches.size() >= MAX_RESOLVE_MATCHES) { break; } } }
private boolean hasImpl(PackList packList, AnyObjectId objectId) throws IOException { for (DfsPackFile pack : packList.packs) { if (pack == last || skipGarbagePack(pack)) continue; if (pack.hasObject(this, objectId)) { last = pack; return true; } } return false; }
private ObjectLoader openImpl(PackList packList, AnyObjectId objectId) throws IOException { for (DfsPackFile pack : packList.packs) { if (pack == last || skipGarbagePack(pack)) { continue; } ObjectLoader ldr = pack.get(this, objectId); if (ldr != null) { last = pack; return ldr; } } return null; }
private long getObjectSizeImpl(PackList packList, AnyObjectId objectId) throws IOException { for (DfsPackFile pack : packList.packs) { if (pack == last || skipGarbagePack(pack)) { continue; } long sz = pack.getObjectSize(this, objectId); if (0 <= sz) { last = pack; return sz; } } return -1; }
if (!skipGarbagePack(lastPack)) { try { long p = lastPack.findOffset(this, t); continue; DfsPackFile pack = packs[i]; if (skipGarbagePack(pack)) continue; try {
/** {@inheritDoc} */ @Override public boolean has(AnyObjectId objectId) throws IOException { if (last != null && !skipGarbagePack(last) && last.hasObject(this, objectId)) return true; PackList packList = db.getPackList(); if (hasImpl(packList, objectId)) { return true; } else if (packList.dirty()) { stats.scanPacks++; return hasImpl(db.scanPacks(packList), objectId); } return false; }
/** {@inheritDoc} */ @Override public long getObjectSize(AnyObjectId objectId, int typeHint) throws MissingObjectException, IncorrectObjectTypeException, IOException { if (last != null && !skipGarbagePack(last)) { long sz = last.getObjectSize(this, objectId); if (0 <= sz) { return sz; } } PackList packList = db.getPackList(); long sz = getObjectSizeImpl(packList, objectId); if (0 <= sz) { return sz; } if (packList.dirty()) { sz = getObjectSizeImpl(packList, objectId); if (0 <= sz) { return sz; } } if (typeHint == OBJ_ANY) { throw new MissingObjectException(objectId.copy(), JGitText.get().unknownObjectType2); } throw new MissingObjectException(objectId.copy(), typeHint); }
/** {@inheritDoc} */ @Override public ObjectLoader open(AnyObjectId objectId, int typeHint) throws MissingObjectException, IncorrectObjectTypeException, IOException { ObjectLoader ldr; if (last != null && !skipGarbagePack(last)) { ldr = last.get(this, objectId); if (ldr != null) { return checkType(ldr, objectId, typeHint); } } PackList packList = db.getPackList(); ldr = openImpl(packList, objectId); if (ldr != null) { return checkType(ldr, objectId, typeHint); } if (packList.dirty()) { stats.scanPacks++; ldr = openImpl(db.scanPacks(packList), objectId); if (ldr != null) { return checkType(ldr, objectId, typeHint); } } if (typeHint == OBJ_ANY) throw new MissingObjectException(objectId.copy(), JGitText.get().unknownObjectType2); throw new MissingObjectException(objectId.copy(), typeHint); }
private boolean hasImpl(PackList packList, AnyObjectId objectId) throws IOException { for (DfsPackFile pack : packList.packs) { if (pack == last || skipGarbagePack(pack)) continue; if (pack.hasObject(this, objectId)) { last = pack; return true; } } return false; }
private void resolveImpl(PackList packList, AbbreviatedObjectId id, HashSet<ObjectId> matches) throws IOException { for (DfsPackFile pack : packList.packs) { if (skipGarbagePack(pack)) { continue; } pack.resolve(this, matches, id, MAX_RESOLVE_MATCHES); if (matches.size() >= MAX_RESOLVE_MATCHES) { break; } } }
private ObjectLoader openImpl(PackList packList, AnyObjectId objectId) throws IOException { for (DfsPackFile pack : packList.packs) { if (pack == last || skipGarbagePack(pack)) { continue; } ObjectLoader ldr = pack.get(this, objectId); if (ldr != null) { last = pack; return ldr; } } return null; }
private long getObjectSizeImpl(PackList packList, AnyObjectId objectId) throws IOException { for (DfsPackFile pack : packList.packs) { if (pack == last || skipGarbagePack(pack)) { continue; } long sz = pack.getObjectSize(this, objectId); if (0 <= sz) { last = pack; return sz; } } return -1; }
if (!skipGarbagePack(lastPack)) { try { long p = lastPack.findOffset(this, t); continue; DfsPackFile pack = packs[i]; if (skipGarbagePack(pack)) continue; try {
/** {@inheritDoc} */ @Override public boolean has(AnyObjectId objectId) throws IOException { if (last != null && !skipGarbagePack(last) && last.hasObject(this, objectId)) return true; PackList packList = db.getPackList(); if (hasImpl(packList, objectId)) { return true; } else if (packList.dirty()) { stats.scanPacks++; return hasImpl(db.scanPacks(packList), objectId); } return false; }
/** {@inheritDoc} */ @Override public long getObjectSize(AnyObjectId objectId, int typeHint) throws MissingObjectException, IncorrectObjectTypeException, IOException { if (last != null && !skipGarbagePack(last)) { long sz = last.getObjectSize(this, objectId); if (0 <= sz) { return sz; } } PackList packList = db.getPackList(); long sz = getObjectSizeImpl(packList, objectId); if (0 <= sz) { return sz; } if (packList.dirty()) { sz = getObjectSizeImpl(packList, objectId); if (0 <= sz) { return sz; } } if (typeHint == OBJ_ANY) { throw new MissingObjectException(objectId.copy(), JGitText.get().unknownObjectType2); } throw new MissingObjectException(objectId.copy(), typeHint); }
/** {@inheritDoc} */ @Override public ObjectLoader open(AnyObjectId objectId, int typeHint) throws MissingObjectException, IncorrectObjectTypeException, IOException { ObjectLoader ldr; if (last != null && !skipGarbagePack(last)) { ldr = last.get(this, objectId); if (ldr != null) { return checkType(ldr, objectId, typeHint); } } PackList packList = db.getPackList(); ldr = openImpl(packList, objectId); if (ldr != null) { return checkType(ldr, objectId, typeHint); } if (packList.dirty()) { stats.scanPacks++; ldr = openImpl(db.scanPacks(packList), objectId); if (ldr != null) { return checkType(ldr, objectId, typeHint); } } if (typeHint == OBJ_ANY) throw new MissingObjectException(objectId.copy(), JGitText.get().unknownObjectType2); throw new MissingObjectException(objectId.copy(), typeHint); }