From 3054834b911cbca8c1c1be58f05f7d830eb96121 Mon Sep 17 00:00:00 2001 From: Uli Heller Date: Wed, 28 Dec 2016 08:44:13 +0100 Subject: [PATCH 1/2] jgit: 4.6.0.201612231935-r --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index a3e522d77..b7ee701cc 100644 --- a/build.sbt +++ b/build.sbt @@ -22,8 +22,8 @@ resolvers ++= Seq( ) 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", From a95abf73970e993987549e32a67520328b949787 Mon Sep 17 00:00:00 2001 From: Uli Heller Date: Wed, 28 Dec 2016 09:06:54 +0100 Subject: [PATCH 2/2] Fixed deprecation warning: I decided to use exactRef although findRef might be a more appropriate replacement --- 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 d118fa4ae..19d5bbf07 100644 --- a/src/main/scala/gitbucket/core/controller/ApiController.scala +++ b/src/main/scala/gitbucket/core/controller/ApiController.scala @@ -175,7 +175,7 @@ trait ApiControllerBase extends ControllerBase { 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))) } })