From acb7a34f3f2dd9216e686a313ff4364cfe07f25a Mon Sep 17 00:00:00 2001 From: Naoki Takezoe Date: Tue, 19 Jun 2018 14:53:36 +0900 Subject: [PATCH] (refs #2073)Fix error in API when getting first commit --- src/main/scala/gitbucket/core/controller/ApiController.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/gitbucket/core/controller/ApiController.scala b/src/main/scala/gitbucket/core/controller/ApiController.scala index 784d02594..fda5fdc5a 100644 --- a/src/main/scala/gitbucket/core/controller/ApiController.scala +++ b/src/main/scala/gitbucket/core/controller/ApiController.scala @@ -811,7 +811,7 @@ trait ApiControllerBase extends ControllerBase { ApiCommits( repositoryName = RepositoryName(repository), commitInfo = commitInfo, - diffs = JGitUtil.getDiffs(git, Some(commitInfo.parents.head), commitInfo.id, false, true), + diffs = JGitUtil.getDiffs(git, commitInfo.parents.headOption, commitInfo.id, false, true), author = getAccount(commitInfo.authorName, commitInfo.authorEmailAddress), committer = getAccount(commitInfo.committerName, commitInfo.committerEmailAddress), commentCount = getCommitComment(repository.owner, repository.name, sha).size