diff --git a/src/main/scala/util/JGitUtil.scala b/src/main/scala/util/JGitUtil.scala index 2e403c0..752a496 100644 --- a/src/main/scala/util/JGitUtil.scala +++ b/src/main/scala/util/JGitUtil.scala @@ -52,10 +52,13 @@ * @param committer the commiter name * @param shortMessage the short message * @param fullMessage the full message + * @param parents the list of parent commid id */ - case class CommitInfo(id: String, time: Date, committer: String, shortMessage: String, fullMessage: String){ - def this(rev: org.eclipse.jgit.revwalk.RevCommit) = - this(rev.getName, rev.getCommitterIdent.getWhen, rev.getCommitterIdent.getName, rev.getShortMessage, rev.getFullMessage) + case class CommitInfo(id: String, time: Date, committer: String, shortMessage: String, fullMessage: String, parents: List[String]){ + + def this(rev: org.eclipse.jgit.revwalk.RevCommit) = this( + rev.getName, rev.getCommitterIdent.getWhen, rev.getCommitterIdent.getName, rev.getShortMessage, rev.getFullMessage, + rev.getParents().map(_.name).toList) val description = { val i = fullMessage.trim.indexOf("\n") diff --git a/src/main/twirl/repo/commit.scala.html b/src/main/twirl/repo/commit.scala.html index 0131f45..8cd58f4 100644 --- a/src/main/twirl/repo/commit.scala.html +++ b/src/main/twirl/repo/commit.scala.html @@ -22,7 +22,21 @@