Package org.eclipse.jgit.lib

Examples of org.eclipse.jgit.lib.Tree.addFile()


    final ObjectId emptyBlob = new ObjectWriter(db).writeBlob(new byte[0]);
    final Tree t = new Tree(db);
    final FileTreeEntry e0 = t.addFile("a-");
    final FileTreeEntry e1 = t.addFile("a-b");
    final FileTreeEntry e2 = t.addFile("a/b");
    final FileTreeEntry e3 = t.addFile("a=");
    final FileTreeEntry e4 = t.addFile("a=b");

    e0.setId(emptyBlob);
    e1.setId(emptyBlob);
    e2.setId(emptyBlob);
View Full Code Here


    final Tree t = new Tree(db);
    final FileTreeEntry e0 = t.addFile("a-");
    final FileTreeEntry e1 = t.addFile("a-b");
    final FileTreeEntry e2 = t.addFile("a/b");
    final FileTreeEntry e3 = t.addFile("a=");
    final FileTreeEntry e4 = t.addFile("a=b");

    e0.setId(emptyBlob);
    e1.setId(emptyBlob);
    e2.setId(emptyBlob);
    e3.setId(emptyBlob);
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());
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.