@Option(name = "-w", aliases = { "--ignore-all-space" }) void ignoreAllSpace(@SuppressWarnings("unused") boolean on) { diffFmt.setDiffComparator(RawTextComparator.WS_IGNORE_ALL); }
@Option(name = "--ignore-space-at-eol") void ignoreSpaceAtEol(@SuppressWarnings("unused") boolean on) { diffFmt.setDiffComparator(RawTextComparator.WS_IGNORE_TRAILING); }
@Option(name = "--ignore-leading-space") void ignoreLeadingSpace(@SuppressWarnings("unused") boolean on) { diffFmt.setDiffComparator(RawTextComparator.WS_IGNORE_LEADING); }
@Option(name = "-w", aliases = { "--ignore-all-space" }) void ignoreAllSpace(@SuppressWarnings("unused") boolean on) { diffFmt.setDiffComparator(RawTextComparator.WS_IGNORE_ALL); }
@Option(name = "-w", aliases = { "--ignore-all-space" }) void ignoreAllSpace(@SuppressWarnings("unused") boolean on) { diffFmt.setDiffComparator(RawTextComparator.WS_IGNORE_ALL); }
@Option(name = "--ignore-space-at-eol") void ignoreSpaceAtEol(@SuppressWarnings("unused") boolean on) { diffFmt.setDiffComparator(RawTextComparator.WS_IGNORE_TRAILING); }
@Option(name = "-b", aliases = { "--ignore-space-change" }) void ignoreSpaceChange(@SuppressWarnings("unused") boolean on) { diffFmt.setDiffComparator(RawTextComparator.WS_IGNORE_CHANGE); }
@Option(name = "--ignore-leading-space") void ignoreLeadingSpace(@SuppressWarnings("unused") boolean on) { diffFmt.setDiffComparator(RawTextComparator.WS_IGNORE_LEADING); }
@Option(name = "--ignore-leading-space") void ignoreLeadingSpace(@SuppressWarnings("unused") boolean on) { diffFmt.setDiffComparator(RawTextComparator.WS_IGNORE_LEADING); }
@Option(name = "-b", aliases = { "--ignore-space-change" }) void ignoreSpaceChange(@SuppressWarnings("unused") boolean on) { diffFmt.setDiffComparator(RawTextComparator.WS_IGNORE_CHANGE); }
@Option(name = "--ignore-space-at-eol") void ignoreSpaceAtEol(@SuppressWarnings("unused") boolean on) { diffFmt.setDiffComparator(RawTextComparator.WS_IGNORE_TRAILING); }
@Option(name = "-b", aliases = { "--ignore-space-change" }) void ignoreSpaceChange(@SuppressWarnings("unused") boolean on) { diffFmt.setDiffComparator(RawTextComparator.WS_IGNORE_CHANGE); }
protected static DiffFormatter createDiffFormatter(Repository r, OutputStream buffer) { DiffFormatter formatter = new DiffFormatter(buffer); formatter.setRepository(r); formatter.setDiffComparator(RawTextComparator.DEFAULT); formatter.setDetectRenames(true); return formatter; }
protected static DiffFormatter createDiffFormatter(Repository r, OutputStream buffer) { DiffFormatter formatter = new DiffFormatter(buffer); formatter.setRepository(r); formatter.setDiffComparator(RawTextComparator.DEFAULT); formatter.setDetectRenames(true); return formatter; }
public DiffFormatter getDiffFormatter(OutputStream out) { DiffFormatter formatter = new DiffFormatter(out); formatter.setRepository(git.getRepository()); formatter.setDiffComparator(RawTextComparator.DEFAULT); formatter.setDetectRenames(true); return formatter; }
private List<DiffEntry> getDiffs(RevCommit commit, RevCommit parent) throws IOException { DiffFormatter formatter = new DiffFormatter(DisabledOutputStream.INSTANCE); formatter.setRepository(repository); formatter.setDiffComparator(RawTextComparator.DEFAULT); formatter.setDetectRenames(true); return formatter.scan(parent.getTree(), commit.getTree()); } }
formatter.setDiffComparator(RawTextComparator.WS_IGNORE_ALL);
/** * Helper method for calculating the diff of a Git commit. */ public List<DiffEntry> getDiffEntries(final Git git, final RevCommit commit) { try { final Repository repository = git.getRepository(); int _parentCount = commit.getParentCount(); boolean _greaterThan = (_parentCount > 1); if (_greaterThan) { throw new IllegalArgumentException("Not supported for merge commits."); } final RevCommit parent = IterableExtensions.<RevCommit>head(((Iterable<RevCommit>)Conversions.doWrapArray(commit.getParents()))); DiffFormatter _diffFormatter = new DiffFormatter(DisabledOutputStream.INSTANCE); final Procedure1<DiffFormatter> _function = (DiffFormatter df) -> { df.setRepository(repository); df.setDiffComparator(RawTextComparator.DEFAULT); df.setDetectRenames(true); }; final DiffFormatter diffFormatter = ObjectExtensions.<DiffFormatter>operator_doubleArrow(_diffFormatter, _function); return diffFormatter.scan(parent, commit.getTree()); } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } }
@Override public Map<String, List<Revision>> getAllHistories() throws StoreException { final Repository repository = git.getRepository(); try { final ObjectId head = repository.resolve(Constants.HEAD); final RevWalk revWalk = new RevWalk(repository); final DiffFormatter df = new DiffFormatter(DisabledOutputStream.INSTANCE); df.setRepository(git.getRepository()); df.setDiffComparator(RawTextComparator.DEFAULT); final HistoryParser historyParser = new HistoryParser(revWalk, df, getTestDefinitionsDirectory()); return historyParser.parseFromHead(head); } catch (final IOException e) { throw new StoreException("Could not get history " + getGitCore().getRefName(), e); } }
@Override public Map<String, List<Revision>> getAllHistories() throws StoreException { final Repository repository = git.getRepository(); try { final ObjectId head = repository.resolve(Constants.HEAD); final RevWalk revWalk = new RevWalk(repository); final DiffFormatter df = new DiffFormatter(DisabledOutputStream.INSTANCE); df.setRepository(git.getRepository()); df.setDiffComparator(RawTextComparator.DEFAULT); final HistoryParser historyParser = new HistoryParser(revWalk, df, getTestDefinitionsDirectory()); return historyParser.parseFromHead(head); } catch (final IOException e) { throw new StoreException("Could not get history " + getGitCore().getRefName(), e); } }