Package org.eclipse.jgit.lib

Examples of org.eclipse.jgit.lib.CommitBuilder.build()


      commit.setAuthor(author);
      commit.setCommitter(myIdent);
      commit.setMessage(msgbuf.toString());
      oi.insert(commit);

      ObjectId commitId = oi.idFor(Constants.OBJ_COMMIT, commit.build());

      final RefUpdate rfu = pdb.updateRef(subscriber.get());
      rfu.setForceUpdate(false);
      rfu.setNewObjectId(commitId);
      rfu.setExpectedOldObjectId(currentCommitId);
View Full Code Here


    CommitBuilder c = new CommitBuilder();
    c.setTreeId(tree);
    c.setParentIds(parents);
    c.setAuthor(mockAuthor(parents));
    c.setCommitter(c.getAuthor());
    return RevCommit.parse(walk, c.build());
  }

  private static PersonIdent mockAuthor(List<RevCommit> parents) {
    String name = RecursiveMerger.class.getSimpleName();
    int time = 0;
View Full Code Here

    src.setTreeId(fmt.idFor(Constants.OBJ_TREE, new byte[] {}));
    src.setAuthor(author);
    src.setCommitter(committer);
    src.setMessage("Test commit\n\nThis is a test.\n");

    RevCommit p = RevCommit.parse(src.build());
    assertEquals(src.getTreeId(), p.getTree());
    assertEquals(0, p.getParentCount());
    assertEquals(author, p.getAuthorIdent());
    assertEquals(committer, p.getCommitterIdent());
    assertEquals("Test commit", p.getShortMessage());
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.