Class TreeRevFilter

java.lang.Object
org.eclipse.jgit.revwalk.filter.RevFilter
org.eclipse.jgit.revwalk.TreeRevFilter

public class TreeRevFilter extends RevFilter
Filter applying a TreeFilter against changed paths in each commit.

Each commit is differenced concurrently against all of its parents to look for tree entries that are interesting to the TreeFilter.

Since:
3.5
  • Field Details

    • PARSED

      private static final int PARSED
      See Also:
    • UNINTERESTING

      private static final int UNINTERESTING
      See Also:
    • rewriteFlag

      private final int rewriteFlag
    • pathFilter

      private final TreeWalk pathFilter
  • Constructor Details

    • TreeRevFilter

      public TreeRevFilter(RevWalk walker, TreeFilter t)
      Create a RevFilter from a TreeFilter.
      Parameters:
      walker - walker used for reading trees.
      t - filter to compare against any changed paths in each commit. If a FollowFilter, will be replaced with a new filter following new paths after a rename.
      Since:
      3.5
    • TreeRevFilter

      TreeRevFilter(RevWalk walker, TreeFilter t, int rewriteFlag)
      Create a filter for the first phase of a parent-rewriting limited revision walk.

      This filter is ANDed to evaluate before all other filters and ties the configured TreeFilter into the revision walking process.

      If no interesting tree entries are found the commit is colored with rewriteFlag, allowing a later pass implemented by RewriteGenerator to remove those colored commits from the DAG.

      Parameters:
      walker - walker used for reading trees.
      t - filter to compare against any changed paths in each commit. If a FollowFilter, will be replaced with a new filter following new paths after a rename.
      rewriteFlag - flag to color commits to be removed from the simplified DAT.
      See Also:
  • Method Details