source = new ContentSource.Pair(source(a), source(b));
source = new ContentSource.Pair(source(a), source(b));
/** * Detect renames in the current file set. * * @param reader * reader to obtain objects from the repository with. * @param pm * report progress during the detection phases. * @return an unmodifiable list of {@link org.eclipse.jgit.diff.DiffEntry}s * representing all files that have been changed. * @throws java.io.IOException * file contents cannot be read from the repository. * @throws CancelledException * if rename detection was cancelled */ // TODO(ms): use org.eclipse.jgit.api.errors.CanceledException in next major // version public List<DiffEntry> compute(ObjectReader reader, ProgressMonitor pm) throws IOException, CancelledException { final ContentSource cs = ContentSource.create(reader); return compute(new ContentSource.Pair(cs, cs), pm); }
/** * Detect renames in the current file set. * * @param reader * reader to obtain objects from the repository with. * @param pm * report progress during the detection phases. * @return an unmodifiable list of {@link DiffEntry}s representing all files * that have been changed. * @throws IOException * file contents cannot be read from the repository. */ public List<DiffEntry> compute(ObjectReader reader, ProgressMonitor pm) throws IOException { final ContentSource cs = ContentSource.create(reader); return compute(new ContentSource.Pair(cs, cs), pm); }
private void setReader(ObjectReader reader, Config cfg, boolean closeReader) { close(); this.closeReader = closeReader; this.reader = reader; this.diffCfg = cfg.get(DiffConfig.KEY); ContentSource cs = ContentSource.create(reader); source = new ContentSource.Pair(cs, cs); if (diffCfg.isNoPrefix()) { setOldPrefix(""); //$NON-NLS-1$ setNewPrefix(""); //$NON-NLS-1$ } setDetectRenames(diffCfg.isRenameDetectionEnabled()); diffAlgorithm = DiffAlgorithm.getAlgorithm(cfg.getEnum( ConfigConstants.CONFIG_DIFF_SECTION, null, ConfigConstants.CONFIG_KEY_ALGORITHM, SupportedAlgorithm.HISTOGRAM)); }
private void setReader(ObjectReader reader, Config cfg, boolean closeReader) { close(); this.closeReader = closeReader; this.reader = reader; this.diffCfg = cfg.get(DiffConfig.KEY); ContentSource cs = ContentSource.create(reader); source = new ContentSource.Pair(cs, cs); if (diffCfg.isNoPrefix()) { setOldPrefix(""); //$NON-NLS-1$ setNewPrefix(""); //$NON-NLS-1$ } setDetectRenames(diffCfg.isRenameDetectionEnabled()); diffAlgorithm = DiffAlgorithm.getAlgorithm(cfg.getEnum( ConfigConstants.CONFIG_DIFF_SECTION, null, ConfigConstants.CONFIG_KEY_ALGORITHM, SupportedAlgorithm.HISTOGRAM)); }
source = new ContentSource.Pair(source(a), source(b));
/** * Detect renames in the current file set. * * @param reader * reader to obtain objects from the repository with. * @param pm * report progress during the detection phases. * @return an unmodifiable list of {@link org.eclipse.jgit.diff.DiffEntry}s * representing all files that have been changed. * @throws java.io.IOException * file contents cannot be read from the repository. * @throws CancelledException * if rename detection was cancelled */ // TODO(ms): use org.eclipse.jgit.api.errors.CanceledException in next major // version public List<DiffEntry> compute(ObjectReader reader, ProgressMonitor pm) throws IOException, CancelledException { final ContentSource cs = ContentSource.create(reader); return compute(new ContentSource.Pair(cs, cs), pm); }
private void setReader(ObjectReader reader, Config cfg, boolean closeReader) { close(); this.closeReader = closeReader; this.reader = reader; this.diffCfg = cfg.get(DiffConfig.KEY); ContentSource cs = ContentSource.create(reader); source = new ContentSource.Pair(cs, cs); if (diffCfg.isNoPrefix()) { setOldPrefix(""); //$NON-NLS-1$ setNewPrefix(""); //$NON-NLS-1$ } setDetectRenames(diffCfg.isRenameDetectionEnabled()); diffAlgorithm = DiffAlgorithm.getAlgorithm(cfg.getEnum( ConfigConstants.CONFIG_DIFF_SECTION, null, ConfigConstants.CONFIG_KEY_ALGORITHM, SupportedAlgorithm.HISTOGRAM)); }