use "exists" instead of "find().isEmpty"

This commit is contained in:
xuwei-k
2017-04-02 15:49:10 +09:00
parent ee8be37f55
commit 968c45c77d

View File

@@ -177,7 +177,7 @@ trait WikiService {
val headId = git.getRepository.resolve(Constants.HEAD + "^{commit}") val headId = git.getRepository.resolve(Constants.HEAD + "^{commit}")
JGitUtil.processTree(git, headId){ (path, tree) => 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)) builder.add(JGitUtil.createDirCacheEntry(path, tree.getEntryFileMode, tree.getEntryObjectId))
} }
} }