(refs #1167)Fix commit information in the branch view

This commit is contained in:
Naoki Takezoe
2016-05-05 16:08:38 +09:00
parent 05bfaafe32
commit 35080a9f33

View File

@@ -896,17 +896,13 @@ object JGitUtil {
git.branchList.call.asScala.map { ref => git.branchList.call.asScala.map { ref =>
val walk = new RevWalk(repo) val walk = new RevWalk(repo)
try { try {
val defaultCommit = walk.parseCommit(defaultObject) val defaultCommit = walk.parseCommit(defaultObject)
val branchName = ref.getName.stripPrefix("refs/heads/") val branchName = ref.getName.stripPrefix("refs/heads/")
val branchCommit = if(branchName == defaultBranch){ val branchCommit = walk.parseCommit(ref.getObjectId)
defaultCommit val when = branchCommit.getCommitterIdent.getWhen
} else { val committer = branchCommit.getCommitterIdent.getName
walk.parseCommit(ref.getObjectId)
}
val when = branchCommit.getCommitterIdent.getWhen
val committer = branchCommit.getCommitterIdent.getName
val committerEmail = branchCommit.getCommitterIdent.getEmailAddress val committerEmail = branchCommit.getCommitterIdent.getEmailAddress
val mergeInfo = if(origin && branchName == defaultBranch){ val mergeInfo = if(origin && branchName == defaultBranch){
None None
} else { } else {
walk.reset() walk.reset()