James Moger
2015-03-07 5d59b9ba3206894198a24807690fba00844c98f7
src/main/java/com/gitblit/utils/DiffUtils.java
@@ -92,16 +92,24 @@
    * Enumeration for the diff comparator types.
    */
   public static enum DiffComparator {
      DEFAULT(RawTextComparator.DEFAULT),
      WS_IGNORE_ALL(RawTextComparator.WS_IGNORE_ALL),
      WS_IGNORE_LEADING(RawTextComparator.WS_IGNORE_LEADING),
      WS_IGNORE_TRAILING(RawTextComparator.WS_IGNORE_TRAILING),
      WS_IGNORE_CHANGE(RawTextComparator.WS_IGNORE_CHANGE);
      SHOW_WHITESPACE(RawTextComparator.DEFAULT),
      IGNORE_WHITESPACE(RawTextComparator.WS_IGNORE_ALL),
      IGNORE_LEADING(RawTextComparator.WS_IGNORE_LEADING),
      IGNORE_TRAILING(RawTextComparator.WS_IGNORE_TRAILING),
      IGNORE_CHANGES(RawTextComparator.WS_IGNORE_CHANGE);
      public final RawTextComparator textComparator;
      DiffComparator(RawTextComparator textComparator) {
         this.textComparator = textComparator;
      }
      public DiffComparator getOpposite() {
         return this == SHOW_WHITESPACE ? IGNORE_WHITESPACE : SHOW_WHITESPACE;
      }
      public String getTranslationKey() {
         return "gb." + name().toLowerCase();
      }
      public static DiffComparator forName(String name) {
@@ -371,7 +379,7 @@
            break;
         }
         df.setRepository(repository);
         df.setDiffComparator((comparator == null ? DiffComparator.DEFAULT : comparator).textComparator);
         df.setDiffComparator((comparator == null ? DiffComparator.SHOW_WHITESPACE : comparator).textComparator);
         df.setDetectRenames(true);
         RevTree commitTree = commit.getTree();