mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 22:15:51 +01:00
Performance Improve for getFileList
This commit is contained in:
@@ -7,11 +7,8 @@ class JGitUtilSpec extends Specification {
|
||||
|
||||
"getFileList(git: Git, revision: String, path)" should {
|
||||
withTestRepository { git =>
|
||||
def list(branch: String, path: String) = try {
|
||||
def list(branch: String, path: String) =
|
||||
JGitUtil.getFileList(git, branch, path).map(finfo => (finfo.name, finfo.message, finfo.isDirectory))
|
||||
} catch {
|
||||
case e: NullPointerException => Nil
|
||||
}
|
||||
list("master", ".") mustEqual Nil
|
||||
list("master", "dir/subdir") mustEqual Nil
|
||||
list("branch", ".") mustEqual Nil
|
||||
|
||||
Reference in New Issue
Block a user