mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 13:35:50 +01:00
(refs #375)Show merge commit diffs correctly
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user