private List<DiffEntry> detectRenames(List<DiffEntry> files) throws IOException { renameDetector.reset(); renameDetector.addAll(files); try { return renameDetector.compute(reader, progressMonitor); } catch (CancelledException e) { // TODO: consider propagating once bug 536323 is tackled // (making DiffEntry.scan() and DiffFormatter.scan() and // format() cancellable). return Collections.emptyList(); } }
/** * Create a new rename detector with a specified reader and diff config. * * @param reader * reader to obtain objects from the repository with. * @param cfg * diff config specifying rename detection options. * @since 3.0 */ public RenameDetector(ObjectReader reader, DiffConfig cfg) { objectReader = reader.newReader(); renameLimit = cfg.getRenameLimit(); reset(); }
private DiffEntry findRename(RevCommit parent, RevCommit commit, PathFilter path) throws IOException { if (renameDetector == null) return null; treeWalk.setFilter(TreeFilter.ANY_DIFF); treeWalk.reset(parent.getTree(), commit.getTree()); renameDetector.reset(); renameDetector.addAll(DiffEntry.scan(treeWalk)); for (DiffEntry ent : renameDetector.compute()) { if (isRename(ent) && ent.getNewPath().equals(path.getPath())) return ent; } return null; }
private List<DiffEntry> detectRenames(List<DiffEntry> files) throws IOException { renameDetector.reset(); renameDetector.addAll(files); try { return renameDetector.compute(reader, progressMonitor); } catch (CancelledException e) { // TODO: consider propagating once bug 536323 is tackled // (making DiffEntry.scan() and DiffFormatter.scan() and // format() cancellable). return Collections.emptyList(); } }
private List<DiffEntry> detectRenames(List<DiffEntry> files) throws IOException { renameDetector.reset(); renameDetector.addAll(files); return renameDetector.compute(reader, progressMonitor); }
/** * Create a new rename detector with a specified reader and diff config. * * @param reader * reader to obtain objects from the repository with. * @param cfg * diff config specifying rename detection options. * @since 3.0 */ public RenameDetector(ObjectReader reader, DiffConfig cfg) { objectReader = reader.newReader(); renameLimit = cfg.getRenameLimit(); reset(); }
/** * Create a new rename detector with a specified reader and diff config. * * @param reader * reader to obtain objects from the repository with. * @param cfg * diff config specifying rename detection options. * @since 3.0 */ public RenameDetector(ObjectReader reader, DiffConfig cfg) { objectReader = reader.newReader(); renameLimit = cfg.getRenameLimit(); reset(); }
private DiffEntry findRename(RevCommit parent, RevCommit commit, PathFilter path) throws IOException { if (renameDetector == null) return null; treeWalk.setFilter(TreeFilter.ANY_DIFF); treeWalk.reset(parent.getTree(), commit.getTree()); renameDetector.reset(); renameDetector.addAll(DiffEntry.scan(treeWalk)); for (DiffEntry ent : renameDetector.compute()) { if (isRename(ent) && ent.getNewPath().equals(path.getPath())) return ent; } return null; }
private DiffEntry findRename(RevCommit parent, RevCommit commit, PathFilter path) throws IOException { if (renameDetector == null) return null; treeWalk.setFilter(TreeFilter.ANY_DIFF); treeWalk.reset(parent.getTree(), commit.getTree()); renameDetector.reset(); renameDetector.addAll(DiffEntry.scan(treeWalk)); for (DiffEntry ent : renameDetector.compute()) { if (isRename(ent) && ent.getNewPath().equals(path.getPath())) return ent; } return null; }
rd.reset(); rd.addAll(DiffEntry.scan(tw)); List<DiffEntry> diffs = rd.compute(or, null);
renameDetector.reset(); renameDetector.addAll(diffs); return include(walker, commit,