Source:
public boolean include(TreeWalk treeWalk) throws MissingObjectException, IncorrectObjectTypeException, IOException { GitTraceLocation.getTrace().trace( GitTraceLocation.DECORATION.getLocation(), treeWalk.getPathString()); final WorkingTreeIterator workingTreeIterator = treeWalk.getTree( T_WORKSPACE, WorkingTreeIterator.class); if (workingTreeIterator != null) { if (workingTreeIterator instanceof ContainerTreeIterator) { final ContainerTreeIterator workspaceIterator = (ContainerTreeIterator) workingTreeIterator; ResourceEntry resourceEntry = workspaceIterator .getResourceEntry(); if (resource.equals(resourceEntry.getResource()) && workspaceIterator.isEntryIgnored()) { ignored = true; return false; } if (resource.getFullPath().isPrefixOf( resourceEntry.getResource().getFullPath()) && treeWalk.getFileMode(T_HEAD) == FileMode.MISSING && treeWalk.getFileMode(T_INDEX) == FileMode.MISSING) { GitTraceLocation.getTrace().trace( GitTraceLocation.DECORATION.getLocation(), "CUT"); return false; } } else { IPath wdPath = new Path(repository.getWorkTree() .getAbsolutePath()).append(workingTreeIterator .getEntryPathString()); IPath resPath = resource.getLocation(); if (wdPath.equals(resPath) && workingTreeIterator.isEntryIgnored()) { ignored = true; return false; } if (resPath.isPrefixOf(wdPath) && treeWalk.getFileMode(T_HEAD) == FileMode.MISSING && treeWalk.getFileMode(T_INDEX) == FileMode.MISSING) { GitTraceLocation.getTrace().trace( GitTraceLocation.DECORATION.getLocation(), "CUT"); return false; } } } if (FileMode.TREE.equals(treeWalk.getRawMode(T_WORKSPACE))) return shouldRecurse(treeWalk); Staged wasStaged = staged; boolean wasDirty = dirty; boolean hadConflicts = conflicts; extractResourceProperties(treeWalk); filesChecked++; ignored = false; assumeValid = false; dirty = wasDirty || dirty; conflicts = hadConflicts || conflicts; if (staged != wasStaged && filesChecked > 1) staged = Staged.MODIFIED; return false; }

Target:
public boolean include(TreeWalk treeWalk) throws MissingObjectException, IncorrectObjectTypeException, IOException { if (trace) GitTraceLocation.getTrace().trace( GitTraceLocation.DECORATION.getLocation(), treeWalk.getPathString()); final WorkingTreeIterator workingTreeIterator = treeWalk.getTree( T_WORKSPACE, WorkingTreeIterator.class); if (workingTreeIterator != null) { if (workingTreeIterator instanceof ContainerTreeIterator) { final ContainerTreeIterator workspaceIterator = (ContainerTreeIterator) workingTreeIterator; ResourceEntry resourceEntry = workspaceIterator .getResourceEntry(); if (resource.equals(resourceEntry.getResource()) && workspaceIterator.isEntryIgnored()) { ignored = true; return false; } if (resource.getFullPath().isPrefixOf( resourceEntry.getResource().getFullPath()) && treeWalk.getFileMode(T_HEAD) == FileMode.MISSING && treeWalk.getFileMode(T_INDEX) == FileMode.MISSING) { if (trace) GitTraceLocation.getTrace().trace( GitTraceLocation.DECORATION.getLocation(), "CUT"); return false; } } else { IPath wdPath = new Path(repository.getWorkTree() .getAbsolutePath()).append(workingTreeIterator .getEntryPathString()); IPath resPath = resource.getLocation(); if (wdPath.equals(resPath) && workingTreeIterator.isEntryIgnored()) { ignored = true; return false; } if (resPath.isPrefixOf(wdPath) && treeWalk.getFileMode(T_HEAD) == FileMode.MISSING && treeWalk.getFileMode(T_INDEX) == FileMode.MISSING) { if (trace) GitTraceLocation.getTrace().trace( GitTraceLocation.DECORATION.getLocation(), "CUT"); return false; } } } if (FileMode.TREE.equals(treeWalk.getRawMode(T_WORKSPACE))) return shouldRecurse(treeWalk); Staged wasStaged = staged; boolean wasDirty = dirty; boolean hadConflicts = conflicts; extractResourceProperties(treeWalk); filesChecked++; ignored = false; assumeValid = false; dirty = wasDirty || dirty; conflicts = hadConflicts || conflicts; if (staged != wasStaged && filesChecked > 1) staged = Staged.MODIFIED; return false; }