Package org.eclipse.jgit.revwalk

Examples of org.eclipse.jgit.revwalk.FollowFilter


    List<TreeFilter> followFilters = new ArrayList<TreeFilter>(paths.size());
    for (String path : paths)
      followFilters.add(createFollowFilter(path, diffConfig));

    if (followFilters.size() == 1) {
      FollowFilter followFilter = (FollowFilter) followFilters.get(0);
      renameTracker.reset(followFilter.getPath());
      return followFilters.get(0);
    }

    // TODO: this scenario is not supported by JGit: RewriteTreeFilter
    // can not handle composite TreeFilters and expects a plain
View Full Code Here


    // FollowFilter for rename detection.
    return OrTreeFilter.create(followFilters);
  }

  private FollowFilter createFollowFilter(String path, DiffConfig diffConfig) {
    FollowFilter followFilter = FollowFilter.create(path, diffConfig);
    followFilter.setRenameCallback(new RenameCallback() {
      @Override
      public void renamed(DiffEntry entry) {
        renameTracker.getCallback().renamed(entry);
        if (fileViewerInterestingPaths != null) {
          fileViewerInterestingPaths.add(entry.getOldPath());
View Full Code Here

    rw.sort(RevSort.BOUNDARY, true);
    try {
      if (path.length() > 0) {
        DiffConfig diffConfig = repository.getConfig().get(
            DiffConfig.KEY);
        FollowFilter filter = FollowFilter.create(path, diffConfig);
        rw.setTreeFilter(filter);
      }

      RevCommit headCommit = rw.parseCommit(repository.getRef(
          Constants.HEAD).getObjectId());
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.revwalk.FollowFilter

Copyright © 2018 www.massapicom. 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.