/** {@inheritDoc} */ @Override public TreeFilter clone() { final TreeFilter n = a.clone(); return n == a ? this : new NotTreeFilter(n); }
private static TreeFilter getDiffTreeFilterFor(AbstractTreeIterator a, AbstractTreeIterator b) { if (a instanceof DirCacheIterator && b instanceof WorkingTreeIterator) return new IndexDiffFilter(0, 1); if (a instanceof WorkingTreeIterator && b instanceof DirCacheIterator) return new IndexDiffFilter(1, 0); TreeFilter filter = TreeFilter.ANY_DIFF; if (a instanceof WorkingTreeIterator) filter = AndTreeFilter.create(new NotIgnoredFilter(0), filter); if (b instanceof WorkingTreeIterator) filter = AndTreeFilter.create(new NotIgnoredFilter(1), filter); return filter; }
@Signature public Memory diff(ArrayMemory settings) throws GitAPIException { DiffCommand command = getWrappedObject().diff(); if (settings != null) { command.setCached(settings.valueOfIndex("cached").toBoolean()); Memory contextLines = settings.valueOfIndex("contextLines"); if (contextLines.isNotNull()) { command.setContextLines(contextLines.toInteger()); } Memory destPrefix = settings.valueOfIndex("destPrefix"); if (destPrefix.isNotNull()) { command.setDestinationPrefix(destPrefix.toString()); } Memory sourcePrefix = settings.valueOfIndex("sourcePrefix"); if (sourcePrefix.isNotNull()) { command.setSourcePrefix(sourcePrefix.toString()); } command.setShowNameAndStatusOnly(settings.valueOfIndex("showNameAndStatusOnly").toBoolean()); Memory pathFilter = settings.valueOfIndex("pathFilter"); if (pathFilter.isNotNull()) { command.setPathFilter(PathFilter.create(pathFilter.toString())); } } List<DiffEntry> call = command.call(); return GitUtils.valueOfDiffEntries(call); }
/** {@inheritDoc} */ @Override public boolean shouldBeRecursive() { return path.shouldBeRecursive() || ANY_DIFF.shouldBeRecursive(); }
/** {@inheritDoc} */ @Override public boolean shouldBeRecursive() { return a.shouldBeRecursive(); }
@Override public String toString() { return "FAST_" + path.toString(); //$NON-NLS-1$ } }
/** * Get result path * * @return path file path being processed */ public String getResultPath() { return resultPath.getPath(); }
/** {@inheritDoc} */ @Override public boolean include(TreeWalk walker) throws MissingObjectException, IncorrectObjectTypeException, IOException { return matchFilter(walker) == 0; }
@Override public boolean include(TreeWalk walker) throws MissingObjectException, IncorrectObjectTypeException, IOException { return matchFilter(walker) <= 0; }
/** {@inheritDoc} */ @Override public boolean include(TreeWalk walker) { return matchFilter(walker) <= 0; }
@Override public boolean shouldBeRecursive() { for (TreeFilter f : subfilters) if (f.shouldBeRecursive()) return true; return false; }