private void verifyClientShallow(Set<ObjectId> shallowCommits) throws IOException, PackProtocolException { AsyncRevObjectQueue q = walk.parseAny(shallowCommits, true); try { for (;;) { try { // Shallow objects named by the client must be commits. RevObject o = q.next(); if (o == null) { break; } if (!(o instanceof RevCommit)) { throw new PackProtocolException( MessageFormat.format( JGitText.get().invalidShallowObject, o.name())); } } catch (MissingObjectException notCommit) { // shallow objects not known at the server are ignored // by git-core upload-pack, match that behavior. shallowCommits.remove(notCommit.getObjectId()); continue; } } } finally { q.release(); } }
throw new WantNotValidException(notFound.getObjectId(), notFound); } finally { q.release();
errors.getMissingObjects().add(e.getObjectId()); continue; ow.checkConnectivity(); } catch (MissingObjectException e) { errors.getMissingObjects().add(e.getObjectId());
private void checkPacks(ProgressMonitor pm, FsckError errors) throws IOException, FileNotFoundException { try (DfsReader ctx = objdb.newReader()) { for (DfsPackFile pack : objdb.getPacks()) { DfsPackDescription packDesc = pack.getPackDescription(); if (packDesc.getPackSource() == PackSource.UNREACHABLE_GARBAGE) { continue; } try (ReadableChannel rc = objdb.openFile(packDesc, PACK)) { verifyPack(pm, errors, ctx, pack, rc); } catch (MissingObjectException e) { errors.getMissingObjects().add(e.getObjectId()); } catch (CorruptPackIndexException e) { errors.getCorruptIndices().add(new CorruptIndex( pack.getPackDescription().getFileName(INDEX), e.getErrorType())); } } } checkGitModules(pm, errors); }
&& have.contains(e.getObjectId())) continue; throw e;
otp = objectsMap.get(notFound.getObjectId()); if (otp != null && otp.isEdge()) { otp.setDoNotDelta();
throw new WantNotValidException(notFound.getObjectId(), notFound); } finally {
private void verifyClientShallow(Set<ObjectId> shallowCommits) throws IOException, PackProtocolException { AsyncRevObjectQueue q = walk.parseAny(shallowCommits, true); try { for (;;) { try { // Shallow objects named by the client must be commits. RevObject o = q.next(); if (o == null) { break; } if (!(o instanceof RevCommit)) { throw new PackProtocolException( MessageFormat.format( JGitText.get().invalidShallowObject, o.name())); } } catch (MissingObjectException notCommit) { // shallow objects not known at the server are ignored // by git-core upload-pack, match that behavior. shallowCommits.remove(notCommit.getObjectId()); continue; } } } finally { q.release(); } }
private void verifyClientShallow() throws IOException, PackProtocolException { AsyncRevObjectQueue q = walk.parseAny(clientShallowCommits, true); try { for (;;) { try { // Shallow objects named by the client must be commits. RevObject o = q.next(); if (o == null) { break; } if (!(o instanceof RevCommit)) { throw new PackProtocolException( MessageFormat.format( JGitText.get().invalidShallowObject, o.name())); } } catch (MissingObjectException notCommit) { // shallow objects not known at the server are ignored // by git-core upload-pack, match that behavior. clientShallowCommits.remove(notCommit.getObjectId()); continue; } } } finally { q.release(); } }
throw new WantNotValidException(notFound.getObjectId(), notFound); } finally { q.release();
throw new WantNotValidException(notFound.getObjectId(), notFound); } finally { q.release();
errors.getMissingObjects().add(e.getObjectId()); continue; ow.checkConnectivity(); } catch (MissingObjectException e) { errors.getMissingObjects().add(e.getObjectId());
private void checkPacks(ProgressMonitor pm, FsckError errors) throws IOException, FileNotFoundException { try (DfsReader ctx = objdb.newReader()) { for (DfsPackFile pack : objdb.getPacks()) { DfsPackDescription packDesc = pack.getPackDescription(); if (packDesc.getPackSource() == PackSource.UNREACHABLE_GARBAGE) { continue; } try (ReadableChannel rc = objdb.openFile(packDesc, PACK)) { verifyPack(pm, errors, ctx, pack, rc); } catch (MissingObjectException e) { errors.getMissingObjects().add(e.getObjectId()); } catch (CorruptPackIndexException e) { errors.getCorruptIndices().add(new CorruptIndex( pack.getPackDescription().getFileName(INDEX), e.getErrorType())); } } } checkGitModules(pm, errors); }
&& have.contains(e.getObjectId())) continue; throw e;
&& have.contains(e.getObjectId())) continue; throw e;
otp = objectsMap.get(notFound.getObjectId()); if (otp != null && otp.isEdge()) { otp.setDoNotDelta();
otp = objectsMap.get(notFound.getObjectId()); if (otp != null && otp.isEdge()) { otp.setDoNotDelta();
throw new WantNotValidException(notFound.getObjectId(), notFound); } finally { q.release();
throw new WantNotValidException(notFound.getObjectId(), notFound); } finally {