Skip to content

Commit 0860e12

Browse files
committed
bump gitbucket to 4.11
1 parent 6002cb9 commit 0860e12

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ resolvers ++= Seq(
99
)
1010

1111
libraryDependencies ++= Seq(
12-
"io.github.gitbucket" %% "gitbucket" % "4.10.0",
12+
"io.github.gitbucket" %% "gitbucket" % "4.11.0",
1313
"javax.servlet" % "javax.servlet-api" % "3.1.0"
1414
)
1515

src/main/scala/gitbucket/plugin/pages/pages.scala

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ package gitbucket.plugin.pages
22

33
import gitbucket.core.controller.ControllerBase
44
import gitbucket.core.service.{ AccountService, RepositoryService }
5-
import gitbucket.core.util.ControlUtil._
5+
import gitbucket.core.util.SyntaxSugars._
66
import gitbucket.core.util.{ Directory, JGitUtil, ReferrerAuthenticator }
77
import org.eclipse.jgit.api.Git
88
import org.eclipse.jgit.lib.ObjectId
99
import org.eclipse.jgit.revwalk.RevCommit
10-
import org.eclipse.jgit.treewalk.TreeWalk
1110

1211
import scala.annotation.tailrec
1312
import scala.language.implicitConversions
@@ -87,20 +86,5 @@ trait PagesControllerBase extends ControllerBase {
8786

8887
def isRoot(path: String) = path == ""
8988

90-
// copy&paste from RepositoryViewerControllerBase
91-
private def getPathObjectId(git: Git, path: String, revCommit: RevCommit): Option[ObjectId] = {
92-
@scala.annotation.tailrec
93-
def _getPathObjectId(path: String, walk: TreeWalk): Option[ObjectId] = walk.next match {
94-
case true if walk.getPathString == path => Some(walk.getObjectId(0))
95-
case true => _getPathObjectId(path, walk)
96-
case false => None
97-
}
98-
99-
using(new TreeWalk(git.getRepository)) { treeWalk =>
100-
treeWalk.addTree(revCommit.getTree)
101-
treeWalk.setRecursive(true)
102-
_getPathObjectId(path, treeWalk)
103-
}
104-
}
10589
}
10690

0 commit comments

Comments
 (0)