Paul Martin
2015-12-25 46f33f87750573713509fbdbd0fc2ae51dc12044
src/main/java/com/gitblit/utils/DiffUtils.java
@@ -157,13 +157,16 @@
      public final List<PathChangeModel> paths = new ArrayList<PathChangeModel>();
      private final String commitId;
      private final Repository repository;
      public DiffStat(String commitId) {
      public DiffStat(String commitId, Repository repository) {
         this.commitId = commitId;
         this.repository = repository;
      }
      public PathChangeModel addPath(DiffEntry entry) {
         PathChangeModel pcm = PathChangeModel.from(entry, commitId);
         PathChangeModel pcm = PathChangeModel.from(entry, commitId, repository);
         paths.add(pcm);
         return pcm;
      }
@@ -379,7 +382,7 @@
         DiffFormatter df;
         switch (outputType) {
         case HTML:
            df = new GitBlitDiffFormatter(commit.getName(), path, handler, tabLength);
            df = new GitBlitDiffFormatter(commit.getName(), repository, path, handler, tabLength);
            break;
         case PLAIN:
         default:
@@ -548,7 +551,7 @@
      DiffStat stat = null;
      try {
         RawTextComparator cmp = RawTextComparator.DEFAULT;
         DiffStatFormatter df = new DiffStatFormatter(commit.getName());
         DiffStatFormatter df = new DiffStatFormatter(commit.getName(), repository);
         df.setRepository(repository);
         df.setDiffComparator(cmp);
         df.setDetectRenames(true);