Package org.eclipse.jgit.transport

Examples of org.eclipse.jgit.transport.IndexPack.index()


    digest(pack);
    final byte[] raw = pack.toByteArray();
    IndexPack ip = IndexPack.create(repo, new ByteArrayInputStream(raw));
    ip.setFixThin(true);
    ip.index(NullProgressMonitor.INSTANCE);
    ip.renameAndOpenPack();

    assertTrue("has blob", wc.has(id3));

    ObjectLoader ol = wc.open(id3);
View Full Code Here


    digest(pack);
    final byte[] raw = pack.toByteArray();
    IndexPack ip = IndexPack.create(repo, new ByteArrayInputStream(raw));
    ip.setFixThin(true);
    ip.index(NullProgressMonitor.INSTANCE);
    ip.renameAndOpenPack();

    assertTrue("has blob", wc.has(id3));

    ObjectLoader ol = wc.open(id3);
View Full Code Here

  private void verifyOpenPack(final boolean thin) throws IOException {
    if (thin) {
      final InputStream is = new ByteArrayInputStream(os.toByteArray());
      final IndexPack indexer = new IndexPack(db, is, packBase);
      try {
        indexer.index(new TextProgressMonitor());
        fail("indexer should grumble about missing object");
      } catch (IOException x) {
        // expected
      }
    }
View Full Code Here

    final InputStream is = new ByteArrayInputStream(os.toByteArray());
    final IndexPack indexer = new IndexPack(db, is, packBase);
    indexer.setKeepEmpty(true);
    indexer.setFixThin(thin);
    indexer.setIndexVersion(2);
    indexer.index(new TextProgressMonitor());
    pack = new PackFile(indexFile, packFile);
  }

  private void verifyObjectsOrder(final ObjectId objectsOrder[]) {
    final List<PackIndex.MutableEntry> entries = new ArrayList<PackIndex.MutableEntry>();
View Full Code Here

    digest(pack);
    final byte[] raw = pack.toByteArray();
    IndexPack ip = IndexPack.create(repo, new ByteArrayInputStream(raw));
    ip.setFixThin(true);
    ip.index(NullProgressMonitor.INSTANCE);
    ip.renameAndOpenPack();

    assertTrue("has blob", wc.has(id3));

    ObjectLoader ol = wc.open(id3);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.