private void verifyOpenPack(final boolean thin) throws IOException {
final byte[] packData = os.toByteArray();
if (thin) {
PackParser p = index(packData);
try {
p.parse(NullProgressMonitor.INSTANCE);
fail("indexer should grumble about missing object");
} catch (IOException x) {
// expected
}
}
ObjectDirectoryPackParser p = (ObjectDirectoryPackParser) index(packData);
p.setKeepEmpty(true);
p.setAllowThin(thin);
p.setIndexVersion(2);
p.parse(NullProgressMonitor.INSTANCE);
pack = p.getPackFile();
assertNotNull("have PackFile after parsing", pack);
}