| | |
| | | import org.eclipse.jgit.revwalk.RevCommit; |
| | | |
| | | import com.gitblit.Constants; |
| | | import com.gitblit.Keys; |
| | | import com.gitblit.models.GitNote; |
| | | import com.gitblit.models.PathModel.PathChangeModel; |
| | | import com.gitblit.models.SubmoduleModel; |
| | |
| | | |
| | | RevCommit commit = getCommit(); |
| | | |
| | | final DiffOutput diff = DiffUtils.getCommitDiff(r, commit, DiffOutputType.HTML); |
| | | |
| | | List<String> parents = new ArrayList<String>(); |
| | | if (commit.getParentCount() > 0) { |
| | | for (RevCommit parent : commit.getParents()) { |
| | |
| | | |
| | | add(new CommitHeaderPanel("commitHeader", repositoryName, commit)); |
| | | |
| | | final List<String> imageExtensions = app().settings().getStrings(Keys.web.imageExtensions); |
| | | final ImageDiffHandler handler = new ImageDiffHandler(getContextUrl(), repositoryName, |
| | | parents.isEmpty() ? null : parents.get(0), commit.getName(), imageExtensions); |
| | | final DiffOutput diff = DiffUtils.getCommitDiff(r, commit, DiffOutputType.HTML, handler); |
| | | |
| | | // add commit diffstat |
| | | int insertions = 0; |
| | | int deletions = 0; |