mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-17 10:50:42 +01:00
use "exists" instead of "find().isEmpty"
This commit is contained in:
@@ -177,7 +177,7 @@ trait WikiService {
|
||||
val headId = git.getRepository.resolve(Constants.HEAD + "^{commit}")
|
||||
|
||||
JGitUtil.processTree(git, headId){ (path, tree) =>
|
||||
if(revertInfo.find(x => x.filePath == path).isEmpty){
|
||||
if(!revertInfo.exists(x => x.filePath == path)){
|
||||
builder.add(JGitUtil.createDirCacheEntry(path, tree.getEntryFileMode, tree.getEntryObjectId))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user