Package org.eclipse.jgit.dircache

Examples of org.eclipse.jgit.dircache.DirCacheBuilder.finish()


      b.add(makeFile("a"));
      b.add(makeFile("b/c"));
      b.add(makeFile("b/d"));
      b.add(makeFile("q"));

      b.finish();
      assertEquals(4, tree.getEntryCount());
    }

    final TreeWalk tw = new TreeWalk(db);
    tw.setPostOrderTraversal(true);
View Full Code Here


      b0.add(createEntry("a.b", EXECUTABLE_FILE));
      b1.add(createEntry("a/b", REGULAR_FILE));
      b0.add(createEntry("a0b", SYMLINK));

      b0.finish();
      b1.finish();
      assertEquals(3, tree0.getEntryCount());
      assertEquals(1, tree1.getEntryCount());
    }

    final TreeWalk tw = new TreeWalk(db);
View Full Code Here

      b0.add(createEntry("a.b", EXECUTABLE_FILE));
      b1.add(createEntry("a/b", REGULAR_FILE));
      b0.add(createEntry("a0b", SYMLINK));

      b0.finish();
      b1.finish();
      assertEquals(3, tree0.getEntryCount());
      assertEquals(1, tree1.getEntryCount());
    }

    final NameConflictTreeWalk tw = new NameConflictTreeWalk(db);
View Full Code Here

      b1.add(createEntry("a.b", EXECUTABLE_FILE));
      b1.add(createEntry("a/b", REGULAR_FILE));
      b0.add(createEntry("a0b", SYMLINK));

      b0.finish();
      b1.finish();
      assertEquals(3, tree0.getEntryCount());
      assertEquals(2, tree1.getEntryCount());
    }

    final NameConflictTreeWalk tw = new NameConflictTreeWalk(db);
View Full Code Here

      b1.add(createEntry("a/b", REGULAR_FILE));
      b0.add(createEntry("a0b", SYMLINK));
      b1.add(createEntry("a0b", SYMLINK));

      b0.finish();
      b1.finish();
      assertEquals(2, tree0.getEntryCount());
      assertEquals(3, tree1.getEntryCount());
    }

    final NameConflictTreeWalk tw = new NameConflictTreeWalk(db);
View Full Code Here

      b1.add(createEntry("a.b", REGULAR_FILE));
      b1.add(createEntry("a/b", REGULAR_FILE));
      b1.add(createEntry("a/c/e", REGULAR_FILE));

      b0.finish();
      b1.finish();
      assertEquals(2, tree0.getEntryCount());
      assertEquals(4, tree1.getEntryCount());
    }

    final NameConflictTreeWalk tw = new NameConflictTreeWalk(db);
View Full Code Here

      throw new JGitInternalException(JGitText.get().emptyCommit);

    // update index
    existingBuilder.commit();
    // finish temporary in-core index used for this commit
    tempBuilder.finish();
    return inCoreIndex;
  }

  /**
   * Look an entry's path up in the list of paths specified by the --only/ -o
View Full Code Here

    b0.add(aSlashB);
    DirCacheEntry aSlashCSlashD = createEntry("a/c/d", REGULAR_FILE);
    b0.add(aSlashCSlashD);
    DirCacheEntry aZeroB = createEntry("a0b", SYMLINK);
    b0.add(aZeroB);
    b0.finish();
    assertEquals(4, tree0.getEntryCount());
    ObjectId tree = tree0.writeTree(oi);

    // Find the directories that were implicitly created above.
    TreeWalk tw = new TreeWalk(or);
View Full Code Here

      DirCacheEntry e = new DirCacheEntry(atw.getRawPath());
      e.setFileMode(atw.getFileMode(0));
      e.setObjectId(atw.getObjectId(0));
      aBuilder.add(e);
    }
    aBuilder.finish();
    return ret;
  }
}
View Full Code Here

            content.getBytes(Constants.CHARACTER_ENCODING));
        dcEntry.setObjectId(objectId);
        dcEntry.setFileMode(FileMode.REGULAR_FILE);
        builder.add(dcEntry);

        builder.finish();
        ObjectId treeId = index.writeTree(inserter);

        // Create a Commit object, populate it and write it
        ObjectId headId = repo.resolve(Constants.HEAD + "^{commit}"); //$NON-NLS-1$
        CommitBuilder commit = new CommitBuilder();
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.