(refs #375)Show merge commit diffs correctly

This commit is contained in:
Tomofumi Tanaka
2014-05-20 21:26:51 +09:00
parent a863951d97
commit 29812f4a82

View File

@@ -372,7 +372,12 @@ object JGitUtil {
if(commits.length >= 2){ if(commits.length >= 2){
// not initial commit // not initial commit
val oldCommit = commits(1) val oldCommit = if(revCommit.getParentCount >= 2) {
// merge commit
revCommit.getParents.head
} else {
commits(1)
}
(getDiffs(git, oldCommit.getName, id, fetchContent), Some(oldCommit.getName)) (getDiffs(git, oldCommit.getName, id, fetchContent), Some(oldCommit.getName))
} else { } else {