Package org.eclipse.jgit.dircache

Examples of org.eclipse.jgit.dircache.DirCache.builder()


    checkCallable();
    DirCache dc = null;

    try {
      dc = repo.lockDirCache();
      DirCacheBuilder builder = dc.builder();
      final TreeWalk tw = new TreeWalk(repo);
      tw.reset(); // drop the first empty tree, which we do not need here
      tw.setRecursive(true);
      tw.setFilter(PathFilterGroup.createFromStrings(filepatterns));
      tw.addTree(new DirCacheBuildIterator(builder));
View Full Code Here


  private void resetIndexForPaths(RevCommit commit) {
    DirCache dc = null;
    try {
      dc = repo.lockDirCache();
      DirCacheBuilder builder = dc.builder();

      final TreeWalk tw = new TreeWalk(repo);
      tw.addTree(new DirCacheBuildIterator(builder));
      tw.addTree(commit.getTree());
      tw.setFilter(PathFilterGroup.createFromStrings(filepaths));
View Full Code Here

  private void resetIndex(RevCommit commit) throws IOException {
    DirCache dc = repo.lockDirCache();
    TreeWalk walk = null;
    try {
      DirCacheBuilder builder = dc.builder();

      walk = new TreeWalk(repo);
      walk.addTree(commit.getTree());
      walk.addTree(new DirCacheIterator(dc));
      walk.setRecursive(true);
View Full Code Here

  private void resetIndex(RevTree tree) throws IOException {
    DirCache dc = repo.lockDirCache();
    TreeWalk walk = null;
    try {
      DirCacheBuilder builder = dc.builder();

      walk = new TreeWalk(repo);
      walk.addTree(tree);
      walk.addTree(new DirCacheIterator(dc));
      walk.setRecursive(true);
View Full Code Here

    DirCacheBuilder existingBuilder = index.builder();

    // get DirCacheBuilder for newly created in-core index to build a
    // temporary index for this commit
    DirCache inCoreIndex = DirCache.newInCore();
    DirCacheBuilder tempBuilder = inCoreIndex.builder();

    onlyProcessed = new boolean[only.size()];
    boolean emptyCommit = true;

    TreeWalk treeWalk = new TreeWalk(repo);
View Full Code Here

    ObjectInserter inserter = repo.newObjectInserter();
    try {
      dc = repo.lockDirCache();
      DirCacheIterator c;

      DirCacheBuilder builder = dc.builder();
      final TreeWalk tw = new TreeWalk(repo);
      tw.addTree(new DirCacheBuildIterator(builder));
      if (workingTreeIterator == null)
        workingTreeIterator = new FileTreeIterator(repo);
      tw.addTree(workingTreeIterator);
View Full Code Here

   */
  private static DirCache createIndex(Repository repo, ObjectId headId,
      File sourceFolder, boolean obliterate) throws IOException {

    DirCache inCoreIndex = DirCache.newInCore();
    DirCacheBuilder dcBuilder = inCoreIndex.builder();
    ObjectInserter inserter = repo.newObjectInserter();

    try {
      // Add all files to the temporary index
      Set<String> ignorePaths = new TreeSet<String>();
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.