James Moger
2013-09-27 319342c09152c61af13930e79777e1396f9c397f
src/main/java/com/gitblit/wicket/pages/CommitPage.java
@@ -43,6 +43,7 @@
import com.gitblit.wicket.panels.CommitHeaderPanel;
import com.gitblit.wicket.panels.CommitLegendPanel;
import com.gitblit.wicket.panels.CompressedDownloadsPanel;
import com.gitblit.wicket.panels.DiffStatPanel;
import com.gitblit.wicket.panels.GravatarImage;
import com.gitblit.wicket.panels.LinkPanel;
import com.gitblit.wicket.panels.RefsPanel;
@@ -141,6 +142,16 @@
      // changed paths list
      List<PathChangeModel> paths = JGitUtils.getFilesInCommit(r, c);
      // add commit diffstat
      int insertions = 0;
      int deletions = 0;
      for (PathChangeModel pcm : paths) {
         insertions += pcm.insertions;
         deletions += pcm.deletions;
      }
      add(new DiffStatPanel("diffStat", insertions, deletions));
      add(new CommitLegendPanel("commitLegend", paths));
      ListDataProvider<PathChangeModel> pathsDp = new ListDataProvider<PathChangeModel>(paths);
      DataView<PathChangeModel> pathsView = new DataView<PathChangeModel>("changedPath", pathsDp) {
@@ -153,7 +164,8 @@
            WicketUtils.setChangeTypeCssClass(changeType, entry.changeType);
            setChangeTypeTooltip(changeType, entry.changeType);
            item.add(changeType);
            item.add(new DiffStatPanel("diffStat", entry.insertions, entry.deletions, true));
            boolean hasSubmodule = false;
            String submodulePath = null;
            if (entry.isTree()) {