diff --git a/build.sbt b/build.sbt index a3e522d..b7ee701 100644 --- a/build.sbt +++ b/build.sbt @@ -22,8 +22,8 @@ ) libraryDependencies ++= Seq( "org.scala-lang.modules" %% "scala-java8-compat" % "0.7.0", - "org.eclipse.jgit" % "org.eclipse.jgit.http.server" % "4.1.2.201602141800-r", - "org.eclipse.jgit" % "org.eclipse.jgit.archive" % "4.1.2.201602141800-r", + "org.eclipse.jgit" % "org.eclipse.jgit.http.server" % "4.6.0.201612231935-r", + "org.eclipse.jgit" % "org.eclipse.jgit.archive" % "4.6.0.201612231935-r", "org.scalatra" %% "scalatra" % ScalatraVersion, "org.scalatra" %% "scalatra-json" % ScalatraVersion, "org.json4s" %% "json4s-jackson" % "3.3.0", diff --git a/src/main/scala/gitbucket/core/controller/ApiController.scala b/src/main/scala/gitbucket/core/controller/ApiController.scala index d118fa4..19d5bbf 100644 --- a/src/main/scala/gitbucket/core/controller/ApiController.scala +++ b/src/main/scala/gitbucket/core/controller/ApiController.scala @@ -175,7 +175,7 @@ using(Git.open(getRepositoryDir(params("owner"), params("repo")))) { git => //JsonFormat( (revstr, git.getRepository().resolve(revstr)) ) // getRef is deprecated by jgit-4.2. use exactRef() or findRef() - val sha = git.getRepository().getRef(revstr).getObjectId().name() + val sha = git.getRepository().exactRef(revstr).getObjectId().name() JsonFormat(ApiRef(revstr, ApiObject(sha))) } })