private WorkingTreeIterator workingTree(TreeWalk tw) { return tw.getTree(workingTree, WorkingTreeIterator.class); }
/** {@inheritDoc} */ @Override public boolean include(TreeWalk walker) { final int n = walker.getTreeCount(); if (n == 1) // Assume they meant difference to empty tree. return true; final int m = walker.getRawMode(baseTree); for (int i = 1; i < n; i++) { DirCacheIterator baseDirCache = walker.getTree(baseTree, DirCacheIterator.class); DirCacheIterator newDirCache = walker.getTree(i, DirCacheIterator.class); if (baseDirCache != null && newDirCache != null) { DirCacheEntry baseDci = baseDirCache.getDirCacheEntry(); DirCacheEntry newDci = newDirCache.getDirCacheEntry(); if (baseDci != null && newDci != null) { if (baseDci.isAssumeValid() != newDci.isAssumeValid()) return true; if (baseDci.isAssumeValid()) // && newDci.isAssumeValid() return false; } } if (walker.getRawMode(i) != m || !walker.idEqual(i, baseTree)) return true; } return false; }
/** * Retrieves the {@link DirCacheIterator} at the current entry if * {@link #setDirCacheIterator(TreeWalk, int)} was called. * * @return the DirCacheIterator, or {@code null} if not set or not at the * current entry * @since 5.0 */ protected DirCacheIterator getDirCacheIterator() { if (state.dirCacheTree >= 0 && state.walk != null) { return state.walk.getTree(state.dirCacheTree, DirCacheIterator.class); } return null; }
fileModes.clear(); while (treeWalk.next()) { AbstractTreeIterator treeIterator = treeWalk.getTree(TREE, AbstractTreeIterator.class); DirCacheIterator dirCacheIterator = treeWalk.getTree(INDEX, DirCacheIterator.class); WorkingTreeIterator workingTreeIterator = treeWalk .getTree(WORKDIR, WorkingTreeIterator.class);
/** {@inheritDoc} */ @Override public boolean include(TreeWalk tw) throws MissingObjectException, IncorrectObjectTypeException, IOException { WorkingTreeIterator i = tw.getTree(index, WorkingTreeIterator.class); return i == null || !i.isEntryIgnored(); }
String path = tw.getPathString(); DirCacheIterator di = tw.getTree(dirCache, DirCacheIterator.class); if (di != null) { DirCacheEntry dce = di.getDirCacheEntry();
/** {@inheritDoc} */ @Override public boolean include(TreeWalk walker) { DirCacheIterator i = walker.getTree(treeIdx, DirCacheIterator.class); if (i == null) return true; DirCacheEntry e = i.getDirCacheEntry(); return e == null || !e.isSkipWorkTree(); }
while (treeWalk.next()) { if (!processEntry( treeWalk.getTree(T_BASE, CanonicalTreeParser.class), treeWalk.getTree(T_OURS, CanonicalTreeParser.class), treeWalk.getTree(T_THEIRS, CanonicalTreeParser.class), treeWalk.getTree(T_INDEX, DirCacheBuildIterator.class), hasWorkingTreeIterator ? treeWalk.getTree(T_FILE, WorkingTreeIterator.class) : null, ignoreConflicts, hasAttributeNodeProvider
private void seek(String path) throws IOException { if (!path.equals(current)) { iterator.reset(); tw.reset(); tw.addTree(iterator); tw.setFilter(PathFilter.create(path)); current = path; if (!tw.next()) throw new FileNotFoundException(path); ptr = tw.getTree(0, WorkingTreeIterator.class); if (ptr == null) throw new FileNotFoundException(path); } } }
DirCacheIterator i = state.walk.getTree(state.dirCacheTree, DirCacheIterator.class); if (i != null) {
treeWalk.addTree(new DirCacheIterator(cache)); treeWalk.addTree(new FileTreeIterator(repo)); treeWalk.getTree(2, FileTreeIterator.class) .setDirCacheIterator(treeWalk, 1); treeWalk.setFilter(AndTreeFilter.create(new SkipWorkTreeFilter( boolean hasChanges = false; do { AbstractTreeIterator headIter = treeWalk.getTree(0, AbstractTreeIterator.class); DirCacheIterator indexIter = treeWalk.getTree(1, DirCacheIterator.class); WorkingTreeIterator wtIter = treeWalk.getTree(2, WorkingTreeIterator.class); if (indexIter != null
final CanonicalTreeParser tree = tw.getTree(1, CanonicalTreeParser.class);
@Override public boolean include(TreeWalk walker) { DirCacheIterator i = walker.getTree(treeIdx, DirCacheIterator.class); if (i == null) return true; DirCacheEntry e = i.getDirCacheEntry(); return e == null || !e.isSkipWorkTree(); }