summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2013-05-23 23:15:40 -0400
committerJames Moger <james.moger@gitblit.com>2013-05-23 23:15:40 -0400
commit0b2232c34d8e087df7c29e8771318964b8a3d9c5 (patch)
tree177c9510c33cb3c437c71b5d1522a824982e2d1d /src
parent722e2325300c7e5d73a93416e28c20354556fec4 (diff)
downloadgitblit-0b2232c34d8e087df7c29e8771318964b8a3d9c5.tar.gz
gitblit-0b2232c34d8e087df7c29e8771318964b8a3d9c5.zip
Removed commitdiff code code for comparing ranges (issue-133)
This feature was incomplete, reported incorrect information, and has been replaced by the compare page (issue-75).
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/gitblit/wicket/pages/CommitDiffPage.java45
1 files changed, 3 insertions, 42 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/CommitDiffPage.java b/src/main/java/com/gitblit/wicket/pages/CommitDiffPage.java
index cfdb8638..ee2aaa2b 100644
--- a/src/main/java/com/gitblit/wicket/pages/CommitDiffPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/CommitDiffPage.java
@@ -15,7 +15,6 @@
*/
package com.gitblit.wicket.pages;
-import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
@@ -52,29 +51,9 @@ public class CommitDiffPage extends RepositoryPage {
DiffOutputType diffType = DiffOutputType.forName(GitBlit.getString(Keys.web.diffStyle,
DiffOutputType.GITBLIT.name()));
- RevCommit commit = null, otherCommit = null;
+ RevCommit commit = getCommit();
- if( objectId.contains("..") )
- {
- String[] parts = objectId.split("\\.\\.");
- commit = getCommit(r, parts[0]);
- otherCommit = getCommit(r, parts[1]);
- }
- else
- {
- commit = getCommit();
- }
-
- String diff;
-
- if(otherCommit == null)
- {
- diff = DiffUtils.getCommitDiff(r, commit, diffType);
- }
- else
- {
- diff = DiffUtils.getDiff(r, commit, otherCommit, diffType);
- }
+ String diff = DiffUtils.getCommitDiff(r, commit, diffType);
List<String> parents = new ArrayList<String>();
if (commit.getParentCount() > 0) {
@@ -98,16 +77,7 @@ public class CommitDiffPage extends RepositoryPage {
add(new CommitHeaderPanel("commitHeader", repositoryName, commit));
// changed paths list
- List<PathChangeModel> paths;
-
- if( otherCommit == null )
- {
- paths = JGitUtils.getFilesInCommit(r, commit);
- }
- else
- {
- paths = JGitUtils.getFilesInCommit(r, otherCommit);
- }
+ List<PathChangeModel> paths = JGitUtils.getFilesInCommit(r, commit);
add(new CommitLegendPanel("commitLegend", paths));
ListDataProvider<PathChangeModel> pathsDp = new ListDataProvider<PathChangeModel>(paths);
@@ -188,13 +158,4 @@ public class CommitDiffPage extends RepositoryPage {
protected Class<? extends BasePage> getRepoNavPageClass() {
return LogPage.class;
}
-
- private RevCommit getCommit(Repository r, String rev)
- {
- RevCommit otherCommit = JGitUtils.getCommit(r, rev);
- if (otherCommit == null) {
- error(MessageFormat.format(getString("gb.failedToFindCommit"), rev, repositoryName, getPageName()), true);
- }
- return otherCommit;
- }
}