/** * Create a diff filter that affects all the given paths * * @param paths * @return tree filter for diffs affecting given paths */ public static TreeFilter and(final String... paths) { if (paths == null) throw new IllegalArgumentException(Assert.formatNotNull("Paths")); if (paths.length == 0) throw new IllegalArgumentException(Assert.formatNotEmpty("Paths")); return andDiff(paths(paths)); }
/** * Create a diff filter that affects any of the given paths * * @param paths * @return tree filter for diffs affecting given paths */ public static TreeFilter or(final String... paths) { if (paths == null) throw new IllegalArgumentException(Assert.formatNotNull("Paths")); if (paths.length == 0) throw new IllegalArgumentException(Assert.formatNotEmpty("Paths")); return AndTreeFilter.create(group(paths), ANY_DIFF); }
/** * Create a diff filter affecting any of the given path suffixes * * @param suffixes * @return tree filter for diffs affecting given suffixes */ public static TreeFilter orSuffix(final String... suffixes) { if (suffixes == null) throw new IllegalArgumentException(Assert.formatNotNull("Suffixes")); if (suffixes.length == 0) throw new IllegalArgumentException( Assert.formatNotEmpty("Suffixes")); return orDiff(suffix(suffixes)); } }
/** * Create a diff filter affecting all of the given path suffixes * * @param suffixes * @return tree filter for diffs affecting given suffixes */ public static TreeFilter andSuffix(final String... suffixes) { if (suffixes == null) throw new IllegalArgumentException(Assert.formatNotNull("Suffixes")); if (suffixes.length == 0) throw new IllegalArgumentException( Assert.formatNotEmpty("Suffixes")); return andDiff(suffix(suffixes)); }
walk.markStart(walk .parseCommit(strictResolve(repository, revision))); walk.setTreeFilter(PathFilterUtils.and(path)); return walk.next(); } catch (IOException e) {
CommitListFilter filter = new CommitListFilter(); if (Strings.isNotBlank(path)) { finder.setFilter(PathFilterUtils.and(path));
CommitListFilter filter = new CommitListFilter(); if (Strings.isNotBlank(path)) { finder.setFilter(PathFilterUtils.and(path));