diff options
author | James Moger <james.moger@gitblit.com> | 2011-04-20 22:14:37 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2011-04-20 22:14:37 -0400 |
commit | 3df3496185d229e6f1cdeb6f182f7933884ca29c (patch) | |
tree | 3d2bec40535db0bb1001bb81c04812f9e8d6a018 /src/com/gitblit/wicket/pages/CommitDiffPage.java | |
parent | 531cd203f387f8358a2e15da5f6171f5871ea688 (diff) | |
download | gitblit-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.java | 6 |
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) {
|