Package org.eclipse.jgit.lib

Examples of org.eclipse.jgit.lib.FileTreeEntry


  }

  public void test023_createCommitNonAnullii() throws IOException {
    final ObjectId emptyId = new ObjectWriter(db).writeBlob(new byte[0]);
    final Tree almostEmptyTree = new Tree(db);
    almostEmptyTree.addEntry(new FileTreeEntry(almostEmptyTree, emptyId, "empty".getBytes(), false));
    final ObjectId almostEmptyTreeId = new ObjectWriter(db).writeTree(almostEmptyTree);
    Commit commit = new Commit(db);
    commit.setTreeId(almostEmptyTreeId);
    commit.setAuthor(new PersonIdent("Joe H\u00e4cker","joe@example.com",4294967295000L,60));
    commit.setCommitter(new PersonIdent("Joe Hacker","joe2@example.com",4294967295000L,60));
View Full Code Here


  }

  public void test024_createCommitNonAscii() throws IOException {
    final ObjectId emptyId = new ObjectWriter(db).writeBlob(new byte[0]);
    final Tree almostEmptyTree = new Tree(db);
    almostEmptyTree.addEntry(new FileTreeEntry(almostEmptyTree, emptyId, "empty".getBytes(), false));
    final ObjectId almostEmptyTreeId = new ObjectWriter(db).writeTree(almostEmptyTree);
    Commit commit = new Commit(db);
    commit.setTreeId(almostEmptyTreeId);
    commit.setAuthor(new PersonIdent("Joe H\u00e4cker","joe@example.com",4294967295000L,60));
    commit.setCommitter(new PersonIdent("Joe Hacker","joe2@example.com",4294967295000L,60));
View Full Code Here

    assertEquals("4f561df5ecf0dfbd53a0dc0f37262fef075d9dde", id.name());
  }

  public void test026_CreateCommitMultipleparents() throws IOException {
    final Tree t = new Tree(db);
    final FileTreeEntry f = t.addFile("i-am-a-file");
    writeTrashFile(f.getName(), "and this is the data in me\n");
    t.accept(new WriteTree(trash, db), TreeEntry.MODIFIED_ONLY);
    assertEquals(ObjectId.fromString("00b1f73724f493096d1ffa0b0f1f1482dbb8c936"),
        t.getTreeId());

    final Commit c1 = new Commit(db);
View Full Code Here

    final RevTree tree_root, tree_A, tree_AB;
    final RevCommit b;
    {
      Tree root = new Tree(db);
      Tree A = root.addTree("A");
      FileTreeEntry B = root.addFile("B");
      B.setId(bId);

      Tree A_A = A.addTree("A");
      Tree A_B = A.addTree("B");

      final ObjectWriter ow = new ObjectWriter(db);
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.lib.FileTreeEntry

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.