James Moger
2015-03-05 edd8d3769d323ebd1ba08e6be3fa2f824b87fc08
src/main/java/com/gitblit/wicket/pages/BlobDiffPage.java
@@ -52,17 +52,23 @@
      if (StringUtils.isEmpty(baseObjectId)) {
         // use first parent
         RevCommit parent = commit.getParentCount() == 0 ? null : commit.getParent(0);
         ImageDiffHandler handler = new ImageDiffHandler(getContextUrl(), repositoryName,
         ImageDiffHandler handler = new ImageDiffHandler(this, repositoryName,
               parent.getName(), commit.getName(), imageExtensions);
         diff = DiffUtils.getDiff(r, commit, blobPath, DiffOutputType.HTML, handler).content;
         if (handler.getImgDiffCount() > 0) {
            addBottomScript("scripts/imgdiff.js"); // Tiny support script for image diffs
         }
         add(new BookmarkablePageLink<Void>("patchLink", PatchPage.class,
               WicketUtils.newPathParameter(repositoryName, objectId, blobPath)));
      } else {
         // base commit specified
         RevCommit baseCommit = JGitUtils.getCommit(r, baseObjectId);
         ImageDiffHandler handler = new ImageDiffHandler(getContextUrl(), repositoryName,
         ImageDiffHandler handler = new ImageDiffHandler(this, repositoryName,
               baseCommit.getName(), commit.getName(), imageExtensions);
         diff = DiffUtils.getDiff(r, baseCommit, commit, blobPath, DiffOutputType.HTML, handler).content;
         if (handler.getImgDiffCount() > 0) {
            addBottomScript("scripts/imgdiff.js"); // Tiny support script for image diffs
         }
         add(new BookmarkablePageLink<Void>("patchLink", PatchPage.class,
               WicketUtils.newBlobDiffParameter(repositoryName, baseObjectId, objectId,
                     blobPath)));