Package org.eclipse.jgit.treewalk

Examples of org.eclipse.jgit.treewalk.TreeWalk.reset()


      // came from so we can properly show the rename or copy,
      // then continue digging backwards.
      //
      a.reset();
      b.reset();
      walk.reset();
      walk.addTree(a);
      walk.addTree(b);
      walk.setFilter(filter);

      if (renameDetector == null)
View Full Code Here


    if (hasUnmergedPaths)
      throw new UnmergedPathsException();

    // determine whether we need to commit
    TreeWalk treeWalk = new TreeWalk(repo);
    treeWalk.reset();
    treeWalk.setRecursive(true);
    treeWalk.addTree(new DirCacheIterator(dc));
    ObjectId id = repo.resolve(Constants.HEAD + "^{tree}");
    if (id == null)
      throw new NoHeadException(
View Full Code Here

    if (hasUnmergedPaths)
      throw new UnmergedPathsException();

    // determine whether we need to commit
    TreeWalk treeWalk = new TreeWalk(repo);
    treeWalk.reset();
    treeWalk.setRecursive(true);
    treeWalk.addTree(new DirCacheIterator(dc));
    ObjectId id = repo.resolve(Constants.HEAD + "^{tree}");
    if (id == null)
      throw new NoHeadException(
View Full Code Here

      if ((p.flags & PARSED) == 0)
        p.parseHeaders(walker);
      trees[i] = p.getTree();
    }
    trees[nParents] = c.getTree();
    tw.reset(trees);

    if (nParents == 1) {
      // We have exactly one parent. This is a very common case.
      //
      int chgs = 0, adds = 0;
View Full Code Here

      throws MissingObjectException, IncorrectObjectTypeException,
      CorruptObjectException, IOException {
    TreeWalk tw = pathFilter;
    FollowFilter oldFilter = (FollowFilter) tw.getFilter();
    tw.setFilter(TreeFilter.ANY_DIFF);
    tw.reset(trees);

    List<DiffEntry> files = DiffEntry.scan(tw);
    RenameDetector rd = new RenameDetector(repository);
    rd.addAll(files);
    files = rd.compute();
View Full Code Here

      // came from so we can properly show the rename or copy,
      // then continue digging backwards.
      //
      a.reset();
      b.reset();
      walk.reset();
      walk.addTree(a);
      walk.addTree(b);
      walk.setFilter(filter);

      if (renameDetector == null)
View Full Code Here

    if (hasUnmergedPaths)
      throw new UnmergedPathsException();

    // determine whether we need to commit
    TreeWalk treeWalk = new TreeWalk(repo);
    treeWalk.reset();
    treeWalk.setRecursive(true);
    treeWalk.addTree(new DirCacheIterator(dc));
    ObjectId id = repo.resolve(Constants.HEAD + "^{tree}");
    if (id == null)
      throw new NoHeadException(
View Full Code Here

      }

      RevTree bTree = b.getTree();

      final TreeWalk walk = new TreeWalk(reader);
      walk.reset();
      walk.setRecursive(true);
      walk.addTree(aTree);
      walk.addTree(bTree);
      walk.setFilter(TreeFilter.ANY_DIFF);
View Full Code Here

    ObjectReader or = db.newObjectReader();
    try {
      final MutableObjectId id = new MutableObjectId();
      RevWalk rw = new RevWalk(or);
      TreeWalk tw = new TreeWalk(or);
      tw.reset(rw.parseTree(db.resolve(Constants.HEAD)));
      tw.setRecursive(true);

      while (tw.next()) {
        FileMode fm = tw.getFileMode(0);
        if (!FileMode.REGULAR_FILE.equals(fm)
View Full Code Here

        if (c.getParentCount() != 1)
          continue;

        RevCommit p = c.getParent(0);
        rw.parseHeaders(p);
        tw.reset(p.getTree(), c.getTree());
        while (tw.next()) {
          if (!isFile(tw, 0) || !isFile(tw, 1))
            continue;

          byte[] raw0;
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.