private ReadableChannel open() throws IOException { if (ch == null) { ch = ctx.db.openFile(file.desc, file.ext); } return ch; }
long start = System.nanoTime(); ReadableChannel rc = fileChannel != null ? fileChannel : ctx.db.openFile(desc, ext); try { int size = blockSize(rc);
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); }
private ReadableChannel open() throws IOException { if (ch == null) { ch = ctx.db.openFile(file.desc, file.ext); } return ch; }
private long copyPackBypassCache(PackOutputStream out, DfsReader ctx) throws IOException { try (ReadableChannel rc = ctx.db.openFile(desc, PACK)) { ByteBuffer buf = newCopyBuffer(out, rc); if (ctx.getOptions().getStreamPackBufferSize() > 0)
ctx.stats.readBitmap++; long start = System.nanoTime(); try (ReadableChannel rc = ctx.db.openFile(desc, BITMAP_INDEX)) { try { InputStream in = Channels.newInputStream(rc);
b = cache.get(key, alignToBlock(position)); if (b == null) { rc = ctx.db.openFile(desc, PACK); int sz = ctx.getOptions().getStreamPackBufferSize(); if (sz > 0) {
ctx.stats.readIdx++; long start = System.nanoTime(); try (ReadableChannel rc = ctx.db.openFile(desc, INDEX)) { InputStream in = Channels.newInputStream(rc); int wantSize = 8192;
throw new PackInvalidException(getPackName()); ReadableChannel rc = ctx.db.openFile(packDesc, PACK); try { int size = blockSize(rc);
long start = System.nanoTime(); ReadableChannel rc = fileChannel != null ? fileChannel : ctx.db.openFile(desc, ext); try { int size = blockSize(rc);
PackBitmapIndex idx; try { ReadableChannel rc = ctx.db.openFile(packDesc, BITMAP_INDEX); try { InputStream in = Channels.newInputStream(rc);
ReadableChannel rc = ctx.db.openFile(packDesc, INDEX); try { InputStream in = Channels.newInputStream(rc);
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); }
private long copyPackBypassCache(PackOutputStream out, DfsReader ctx) throws IOException { try (ReadableChannel rc = ctx.db.openFile(packDesc, PACK)) { ByteBuffer buf = newCopyBuffer(out, rc); if (ctx.getOptions().getStreamPackBufferSize() > 0)
private long copyPackBypassCache(PackOutputStream out, DfsReader ctx) throws IOException { try (ReadableChannel rc = ctx.db.openFile(desc, PACK)) { ByteBuffer buf = newCopyBuffer(out, rc); if (ctx.getOptions().getStreamPackBufferSize() > 0)
ctx.stats.readIdx++; long start = System.nanoTime(); try (ReadableChannel rc = ctx.db.openFile(desc, INDEX)) { InputStream in = Channels.newInputStream(rc); int wantSize = 8192;
ctx.stats.readBitmap++; long start = System.nanoTime(); try (ReadableChannel rc = ctx.db.openFile(desc, BITMAP_INDEX)) { try { InputStream in = Channels.newInputStream(rc);
b = cache.get(key, alignToBlock(position)); if (b == null) { rc = ctx.db.openFile(desc, PACK); int sz = ctx.getOptions().getStreamPackBufferSize(); if (sz > 0) {