mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-05 04:56:02 +01:00
(refs #375)Show merge commit diffs correctly
This commit is contained in:
@@ -372,7 +372,12 @@ object JGitUtil {
|
||||
|
||||
if(commits.length >= 2){
|
||||
// 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))
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user