Package org.eclipse.jgit.junit.TestRepository

Examples of org.eclipse.jgit.junit.TestRepository.BranchBuilder


    assertEquals(0, stats.numberOfPackFiles);
  }

  @Theory
  public void testPack2Commits(boolean aggressive) throws Exception {
    BranchBuilder bb = tr.branch("refs/heads/master");
    bb.commit().add("A", "A").add("B", "B").create();
    bb.commit().add("A", "A2").add("B", "B2").create();

    stats = gc.getStatistics();
    assertEquals(8, stats.numberOfLooseObjects);
    assertEquals(0, stats.numberOfPackedObjects);
    configureGc(gc, aggressive);
View Full Code Here


    assertEquals(1, stats.numberOfPackFiles);
  }

  @Theory
  public void testPackCommitsAndLooseOne(boolean aggressive) throws Exception {
    BranchBuilder bb = tr.branch("refs/heads/master");
    RevCommit first = bb.commit().add("A", "A").add("B", "B").create();
    bb.commit().add("A", "A2").add("B", "B2").create();
    tr.update("refs/heads/master", first);

    stats = gc.getStatistics();
    assertEquals(8, stats.numberOfLooseObjects);
    assertEquals(0, stats.numberOfPackedObjects);
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.junit.TestRepository.BranchBuilder

Copyright © 2018 www.massapicom. 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.