Examples of addTree()


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

  public List<DiffEntry> scan(AbstractTreeIterator a, AbstractTreeIterator b)
      throws IOException {
    assertHaveRepository();

    TreeWalk walk = new TreeWalk(reader);
    walk.addTree(a);
    walk.addTree(b);
    walk.setRecursive(true);

    TreeFilter filter = getDiffTreeFilterFor(a, b);
    if (pathFilter instanceof FollowFilter) {
View Full Code Here

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

      throws IOException {
    assertHaveRepository();

    TreeWalk walk = new TreeWalk(reader);
    walk.addTree(a);
    walk.addTree(b);
    walk.setRecursive(true);

    TreeFilter filter = getDiffTreeFilterFor(a, b);
    if (pathFilter instanceof FollowFilter) {
      walk.setFilter(AndTreeFilter.create(
View Full Code Here

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

      // then continue digging backwards.
      //
      a.reset();
      b.reset();
      walk.reset();
      walk.addTree(a);
      walk.addTree(b);
      walk.setFilter(filter);

      if (renameDetector == null)
        setDetectRenames(true);
View Full Code Here

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

      //
      a.reset();
      b.reset();
      walk.reset();
      walk.addTree(a);
      walk.addTree(b);
      walk.setFilter(filter);

      if (renameDetector == null)
        setDetectRenames(true);
      files = updateFollowFilter(detectRenames(DiffEntry.scan(walk)));
View Full Code Here

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

    // 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(
          JGitText.get().cannotRebaseWithoutCurrentHead);
View Full Code Here

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

    ObjectId id = repo.resolve(Constants.HEAD + "^{tree}");
    if (id == null)
      throw new NoHeadException(
          JGitText.get().cannotRebaseWithoutCurrentHead);

    treeWalk.addTree(id);

    treeWalk.setFilter(TreeFilter.ANY_DIFF);

    boolean needsCommit = treeWalk.next();
    treeWalk.release();
View Full Code Here

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

    RevWalk revWalk = new RevWalk(repo);
    DirCache dc = repo.lockDirCache();
    try {
      TreeWalk treeWalk = new TreeWalk(revWalk.getObjectReader());
      treeWalk.setRecursive(true);
      treeWalk.addTree(new DirCacheIterator(dc));
      treeWalk.setFilter(PathFilterGroup.createFromStrings(paths));
      List<String> files = new LinkedList<String>();
      while (treeWalk.next())
        files.add(treeWalk.getPathString());
View Full Code Here

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

      if (startCommit != null || startPoint != null) {
        DirCacheEditor editor = dc.editor();
        TreeWalk startWalk = new TreeWalk(revWalk.getObjectReader());
        startWalk.setRecursive(true);
        startWalk.setFilter(treeWalk.getFilter());
        startWalk.addTree(revWalk.parseCommit(getStartPoint())
            .getTree());
        while (startWalk.next()) {
          final ObjectId blobId = startWalk.getObjectId(0);
          editor.add(new PathEdit(startWalk.getPathString()) {
View Full Code Here

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

    try {
      dc = repo.lockDirCache();
      edit = dc.editor();

      final TreeWalk tw = new TreeWalk(repo);
      tw.addTree(new DirCacheIterator(dc));
      tw.addTree(commit.getTree());
      tw.setFilter(PathFilterGroup.createFromStrings(filepaths));

      while (tw.next()) {
        final String path = tw.getPathString();
View Full Code Here

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

      dc = repo.lockDirCache();
      edit = dc.editor();

      final TreeWalk tw = new TreeWalk(repo);
      tw.addTree(new DirCacheIterator(dc));
      tw.addTree(commit.getTree());
      tw.setFilter(PathFilterGroup.createFromStrings(filepaths));

      while (tw.next()) {
        final String path = tw.getPathString();
        // DirCacheIterator dci = tw.getTree(0, DirCacheIterator.class);
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.