summaryrefslogtreecommitdiffstats
path: root/src/com/gitblit/wicket/pages/CommitDiffPage.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2011-04-20 22:14:37 -0400
committerJames Moger <james.moger@gitblit.com>2011-04-20 22:14:37 -0400
commit3df3496185d229e6f1cdeb6f182f7933884ca29c (patch)
tree3d2bec40535db0bb1001bb81c04812f9e8d6a018 /src/com/gitblit/wicket/pages/CommitDiffPage.java
parent531cd203f387f8358a2e15da5f6171f5871ea688 (diff)
downloadgitblit-3df3496185d229e6f1cdeb6f182f7933884ca29c.tar.gz
gitblit-3df3496185d229e6f1cdeb6f182f7933884ca29c.zip
Selectable diff presentation: gitblit, gitweb, or plain.
Diffstat (limited to 'src/com/gitblit/wicket/pages/CommitDiffPage.java')
-rw-r--r--src/com/gitblit/wicket/pages/CommitDiffPage.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/gitblit/wicket/pages/CommitDiffPage.java b/src/com/gitblit/wicket/pages/CommitDiffPage.java
index d52b7a36..c6f1f7d3 100644
--- a/src/com/gitblit/wicket/pages/CommitDiffPage.java
+++ b/src/com/gitblit/wicket/pages/CommitDiffPage.java
@@ -12,7 +12,10 @@ import org.apache.wicket.markup.repeater.data.ListDataProvider;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
+import com.gitblit.GitBlit;
+import com.gitblit.Keys;
import com.gitblit.utils.JGitUtils;
+import com.gitblit.utils.JGitUtils.DiffOutputType;
import com.gitblit.wicket.LinkPanel;
import com.gitblit.wicket.RepositoryPage;
import com.gitblit.wicket.WicketUtils;
@@ -25,7 +28,8 @@ public class CommitDiffPage extends RepositoryPage {
Repository r = getRepository();
RevCommit commit = JGitUtils.getCommit(r, objectId);
- String diff = JGitUtils.getCommitDiff(r, commit, true);
+ DiffOutputType diffType = DiffOutputType.forName(GitBlit.self().settings().getString(Keys.web.diffStyle, DiffOutputType.GITBLIT.name()));
+ String diff = JGitUtils.getCommitDiff(r, commit, diffType);
List<String> parents = new ArrayList<String>();
if (commit.getParentCount() > 0) {