Package org.eclipse.jgit.revwalk

Examples of org.eclipse.jgit.revwalk.RevWalk.parseTree()


              .newMerger(repo, true);
          ixMerger.setCommitNames(new String[] { "stashed HEAD",
              "HEAD", "stashed index" });
          boolean ok = ixMerger.merge(headCommit, stashIndexCommit);
          if (ok) {
            resetIndex(revWalk
                .parseTree(ixMerger.getResultTreeId()));
          } else {
            throw new StashApplyFailureException(
                JGitText.get().stashApplyConflict);
          }
View Full Code Here


              .newMerger(repo, true);
          ixMerger.setCommitNames(new String[] { "stashed HEAD",
              "HEAD", "stashed index" });
          boolean ok = ixMerger.merge(headCommit, stashIndexCommit);
          if (ok) {
            resetIndex(revWalk
                .parseTree(ixMerger.getResultTreeId()));
          } else {
            throw new StashApplyFailureException(
                JGitText.get().stashApplyConflict);
          }
View Full Code Here

      try {
        final MutableObjectId idBuf = new MutableObjectId();
        final ObjectReader reader = walk.getObjectReader();
        final RevWalk rw = new RevWalk(walk.getObjectReader());

        walk.reset(rw.parseTree(tree));
        walk.setRecursive(true);
        while (walk.next()) {
          final String name = walk.getPathString();
          final FileMode mode = walk.getFileMode(0);
View Full Code Here

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

    RevWalk rw = new RevWalk(reader);
    return scan(rw.parseTree(a), rw.parseTree(b));
  }

  /**
   * Determine the differences between two trees.
   *
 
View Full Code Here

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

    RevWalk rw = new RevWalk(reader);
    return scan(rw.parseTree(a), rw.parseTree(b));
  }

  /**
   * Determine the differences between two trees.
   *
 
View Full Code Here

    try {
      treeWalk.addTree(new DirCacheIterator(repo.readDirCache()));
      ObjectId headID = repo.resolve(Constants.HEAD);
      if (headID != null) {
        revWalk = new RevWalk(repo);
        treeWalk.addTree(revWalk.parseTree(headID));
        revWalk.dispose();
        revWalk = null;
      }

      treeWalk.setFilter(TreeFilter.ANY_DIFF);
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.