(refs #1727) Repair the commit diff view

This commit is contained in:
Naoki Takezoe
2017-10-04 18:16:56 +09:00
parent badc9b5117
commit 5e7afa0f41
2 changed files with 1 additions and 2 deletions

View File

@@ -432,7 +432,7 @@ trait RepositoryViewerControllerBase extends ControllerBase {
try {
using(Git.open(getRepositoryDir(repository.owner, repository.name))) { git =>
defining(JGitUtil.getRevCommitFromId(git, git.getRepository.resolve(id))) { revCommit =>
JGitUtil.getDiffs(git, id, false) match {
JGitUtil.getDiffs(git, id, true) match {
case (diffs, oldCommitId) =>
html.commit(id, new JGitUtil.CommitInfo(revCommit),
JGitUtil.getBranchesOfCommit(git, revCommit.getName),

View File

@@ -351,7 +351,6 @@ class WikiCommitHook(owner: String, repository: String, pusher: String, baseUrl:
diffs._1.collect { case diff if diff.newPath.toLowerCase.endsWith(".md") =>
val action = if(diff.changeType == ChangeType.ADD) "created" else "edited"
val fileName = diff.newPath
//println(action + " - " + fileName + " - " + commit.id)
(action, fileName, commit.id)
}
}