/** * Does the requested object exist in this database? * * @param objectId * identity of the object to test for existence of. * @return true if the specified object is stored in this database. * @throws java.io.IOException * the object store cannot be accessed. */ public boolean has(AnyObjectId objectId) throws IOException { return has(objectId, OBJ_ANY); }
@Override public boolean has(AnyObjectId objectId) throws IOException { return delegate().has(objectId); }
private void checkObjectCollision() throws IOException { for (PackedObjectInfo obj : collisionCheckObjs) { if (!readCurs.has(obj)) { continue; } checkObjectCollision(obj); } }
@Override public boolean has(AnyObjectId objectId, int typeHint) throws IOException { return delegate().has(objectId, typeHint); }
/** * Does the requested object exist in this database? * <p> * This is a one-shot call interface which may be faster than allocating a * {@link #newReader()} to perform the lookup. * * @param objectId * identity of the object to test for existence of. * @return true if the specified object is stored in this database. * @throws java.io.IOException * the object store cannot be accessed. */ public boolean has(AnyObjectId objectId) throws IOException { try (ObjectReader or = newReader()) { return or.has(objectId); } }
@Override void parseHeaders(RevWalk walk) throws MissingObjectException, IncorrectObjectTypeException, IOException { if (walk.reader.has(this)) flags |= PARSED; else throw new MissingObjectException(this, getType()); }
@Override void parseHeaders(RevWalk walk) throws MissingObjectException, IncorrectObjectTypeException, IOException { if (walk.reader.has(this)) flags |= PARSED; else throw new MissingObjectException(this, getType()); }
private boolean alreadyHave(AnyObjectId id) throws TransportException { try { return reader.has(id); } catch (IOException error) { throw new TransportException(MessageFormat.format( JGitText.get().cannotReadObject, id.name()), error); } }
/** * Does the requested object exist in this database? * <p> * This differs from ObjectDatabase's implementation in that we can selectively * ignore unreachable (garbage) objects. * * @param objectId * identity of the object to test for existence of. * @param avoidUnreachableObjects * if true, ignore objects that are unreachable. * @return true if the specified object is stored in this database. * @throws java.io.IOException * the object store cannot be accessed. */ public boolean has(AnyObjectId objectId, boolean avoidUnreachableObjects) throws IOException { try (ObjectReader or = newReader()) { or.setAvoidUnreachableObjects(avoidUnreachableObjects); return or.has(objectId); } }
private void processBlob(RevObject obj) throws TransportException { try { if (reader.has(obj, Constants.OBJ_BLOB)) obj.add(COMPLETE); else throw new TransportException(MessageFormat.format(JGitText .get().cannotReadBlob, obj.name()), new MissingObjectException(obj, Constants.TYPE_BLOB)); } catch (IOException error) { throw new TransportException(MessageFormat.format( JGitText.get().cannotReadBlob, obj.name()), error); } }
if (o == null) break; if (o instanceof RevBlob && !reader.has(o)) throw new MissingObjectException(o, OBJ_BLOB);
/** * Does the requested object exist in this database? * * @param objectId * identity of the object to test for existence of. * @return true if the specified object is stored in this database. * @throws IOException * the object store cannot be accessed. */ public boolean has(AnyObjectId objectId) throws IOException { return has(objectId, OBJ_ANY); }
if (isCheckObjectCollisions() && readCurs.has(tempObjectId)) { checkObjectCollision(tempObjectId, type, visit.data);
pckOut.writeString("acknowledgments\n"); //$NON-NLS-1$ for (ObjectId id : req.getPeerHas()) { if (walk.getObjectReader().has(id)) { pckOut.writeString("ACK " + id.getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
private void checkObjectCollision() throws IOException { for (PackedObjectInfo obj : collisionCheckObjs) { if (!readCurs.has(obj)) { continue; } checkObjectCollision(obj); } }
@Override void parseHeaders(RevWalk walk) throws MissingObjectException, IncorrectObjectTypeException, IOException { if (walk.reader.has(this)) flags |= PARSED; else throw new MissingObjectException(this, getType()); }
@Override void parseHeaders(RevWalk walk) throws MissingObjectException, IncorrectObjectTypeException, IOException { if (walk.reader.has(this)) flags |= PARSED; else throw new MissingObjectException(this, getType()); }
@Override void parseHeaders(RevWalk walk) throws MissingObjectException, IncorrectObjectTypeException, IOException { if (walk.reader.has(this)) flags |= PARSED; else throw new MissingObjectException(this, getType()); }
@Override void parseHeaders(RevWalk walk) throws MissingObjectException, IncorrectObjectTypeException, IOException { if (walk.reader.has(this)) flags |= PARSED; else throw new MissingObjectException(this, getType()); }
private boolean alreadyHave(AnyObjectId id) throws TransportException { try { return reader.has(id); } catch (IOException error) { throw new TransportException(MessageFormat.format( JGitText.get().cannotReadObject, id.name()), error); } }