Package org.eclipse.jgit.diff

Examples of org.eclipse.jgit.diff.RawTextComparator


    }
  }

  private PatchList readPatchList(final PatchListKey key,
      final Repository repo) throws IOException {
    final RawTextComparator cmp = comparatorFor(key.getWhitespace());
    final ObjectReader reader = repo.newObjectReader();
    try {
      final RevWalk rw = new RevWalk(reader);
      final RevCommit b = rw.parseCommit(key.getNewId());
      final RevObject a = aFor(key, repo, rw, b);
View Full Code Here


      String path, DiffOutputType outputType) {
    DiffStat stat = null;
    String diff = null;
    try {
      final ByteArrayOutputStream os = new ByteArrayOutputStream();
      RawTextComparator cmp = RawTextComparator.DEFAULT;
      DiffFormatter df;
      switch (outputType) {
      case HTML:
        df = new GitBlitDiffFormatter(os, commit.getName());
        break;
View Full Code Here

  public static String getCommitPatch(Repository repository, RevCommit baseCommit,
      RevCommit commit, String path) {
    String diff = null;
    try {
      final ByteArrayOutputStream os = new ByteArrayOutputStream();
      RawTextComparator cmp = RawTextComparator.DEFAULT;
      PatchFormatter df = new PatchFormatter(os);
      df.setRepository(repository);
      df.setDiffComparator(cmp);
      df.setDetectRenames(true);
View Full Code Here

   */
  public static DiffStat getDiffStat(Repository repository, RevCommit baseCommit,
      RevCommit commit, String path) {
    DiffStat stat = null;
    try {
      RawTextComparator cmp = RawTextComparator.DEFAULT;
      DiffStatFormatter df = new DiffStatFormatter(commit.getName());
      df.setRepository(repository);
      df.setDiffComparator(cmp);
      df.setDetectRenames(true);

View Full Code Here

            baseCommit = CommitUtils.getCommit(r, baseObjectId);
        }

        ByteArrayOutputStream buffer = new ByteArrayOutputStream();

        RawTextComparator cmp = RawTextComparator.DEFAULT;
        DiffFormatter formatter = new DiffFormatter(buffer);
        formatter.setRepository(r);
        formatter.setDiffComparator(cmp);
        formatter.setDetectRenames(true);
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.diff.RawTextComparator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.