diff options
author | James Moger <james.moger@gitblit.com> | 2013-09-18 11:20:28 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2013-09-18 11:31:00 -0400 |
commit | 0250286553ca93406bfaa976d6aae61e76a9d55f (patch) | |
tree | a6edb6545a993c3e16709742d1bd177e33fcc9e7 /src/main/java/com/gitblit/wicket | |
parent | cd9461c0c05958444d1313b794be57df39d98956 (diff) | |
download | gitblit-0250286553ca93406bfaa976d6aae61e76a9d55f.tar.gz gitblit-0250286553ca93406bfaa976d6aae61e76a9d55f.zip |
Removed GitWeb-style diff renderer
Diffstat (limited to 'src/main/java/com/gitblit/wicket')
3 files changed, 4 insertions, 18 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/BlobDiffPage.java b/src/main/java/com/gitblit/wicket/pages/BlobDiffPage.java index c297bcaf..8dc9d840 100644 --- a/src/main/java/com/gitblit/wicket/pages/BlobDiffPage.java +++ b/src/main/java/com/gitblit/wicket/pages/BlobDiffPage.java @@ -21,8 +21,6 @@ import org.apache.wicket.markup.html.link.BookmarkablePageLink; import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
-import com.gitblit.GitBlit;
-import com.gitblit.Keys;
import com.gitblit.utils.DiffUtils;
import com.gitblit.utils.DiffUtils.DiffOutputType;
import com.gitblit.utils.JGitUtils;
@@ -45,19 +43,16 @@ public class BlobDiffPage extends RepositoryPage { Repository r = getRepository();
RevCommit commit = getCommit();
- DiffOutputType diffType = DiffOutputType.forName(GitBlit.getString(Keys.web.diffStyle,
- DiffOutputType.GITBLIT.name()));
-
String diff;
if (StringUtils.isEmpty(baseObjectId)) {
// use first parent
- diff = DiffUtils.getDiff(r, commit, blobPath, diffType);
+ diff = DiffUtils.getDiff(r, commit, blobPath, DiffOutputType.HTML);
add(new BookmarkablePageLink<Void>("patchLink", PatchPage.class,
WicketUtils.newPathParameter(repositoryName, objectId, blobPath)));
} else {
// base commit specified
RevCommit baseCommit = JGitUtils.getCommit(r, baseObjectId);
- diff = DiffUtils.getDiff(r, baseCommit, commit, blobPath, diffType);
+ diff = DiffUtils.getDiff(r, baseCommit, commit, blobPath, DiffOutputType.HTML);
add(new BookmarkablePageLink<Void>("patchLink", PatchPage.class,
WicketUtils.newBlobDiffParameter(repositoryName, baseObjectId, objectId,
blobPath)));
diff --git a/src/main/java/com/gitblit/wicket/pages/CommitDiffPage.java b/src/main/java/com/gitblit/wicket/pages/CommitDiffPage.java index 0a41b67b..4c802d74 100644 --- a/src/main/java/com/gitblit/wicket/pages/CommitDiffPage.java +++ b/src/main/java/com/gitblit/wicket/pages/CommitDiffPage.java @@ -30,7 +30,6 @@ import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.revwalk.RevCommit; import com.gitblit.GitBlit; -import com.gitblit.Keys; import com.gitblit.models.PathModel.PathChangeModel; import com.gitblit.models.SubmoduleModel; import com.gitblit.utils.DiffUtils; @@ -51,12 +50,9 @@ public class CommitDiffPage extends RepositoryPage { Repository r = getRepository(); - DiffOutputType diffType = DiffOutputType.forName(GitBlit.getString(Keys.web.diffStyle, - DiffOutputType.GITBLIT.name())); - RevCommit commit = getCommit(); - String diff = DiffUtils.getCommitDiff(r, commit, diffType); + String diff = DiffUtils.getCommitDiff(r, commit, DiffOutputType.HTML); List<String> parents = new ArrayList<String>(); if (commit.getParentCount() > 0) { diff --git a/src/main/java/com/gitblit/wicket/pages/ComparePage.java b/src/main/java/com/gitblit/wicket/pages/ComparePage.java index f5f35263..a513f00e 100644 --- a/src/main/java/com/gitblit/wicket/pages/ComparePage.java +++ b/src/main/java/com/gitblit/wicket/pages/ComparePage.java @@ -37,8 +37,6 @@ import org.eclipse.jgit.diff.DiffEntry.ChangeType; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.revwalk.RevCommit; -import com.gitblit.GitBlit; -import com.gitblit.Keys; import com.gitblit.models.PathModel.PathChangeModel; import com.gitblit.models.RefModel; import com.gitblit.models.RepositoryModel; @@ -80,9 +78,6 @@ public class ComparePage extends RepositoryPage { Fragment comparison = new Fragment("comparison", "comparisonFragment", this); add(comparison); - DiffOutputType diffType = DiffOutputType.forName(GitBlit.getString(Keys.web.diffStyle, - DiffOutputType.GITBLIT.name())); - RevCommit fromCommit; RevCommit toCommit; @@ -113,7 +108,7 @@ public class ComparePage extends RepositoryPage { fromCommitId.setObject(startId); toCommitId.setObject(endId); - String diff = DiffUtils.getDiff(r, fromCommit, toCommit, diffType); + String diff = DiffUtils.getDiff(r, fromCommit, toCommit, DiffOutputType.HTML); // compare page links // comparison.add(new BookmarkablePageLink<Void>("patchLink", PatchPage.class, |