override fun visitFile()

in src/main/kotlin/mobi/hsz/idea/gitignore/util/Glob.kt [52:73]


                override fun visitFile(file: VirtualFile): Boolean {
                    if (root == file) {
                        return true
                    }
                    val current = mutableMapOf<IgnoreEntry, Pattern?>()
                    val path = getRelativePath(root, file)
                    if (currentValue.isEmpty() || path == null || isVcsDirectory(file)) {
                        return false
                    }

                    currentValue.forEach { (key, value) ->
                        var matches = false
                        if (value == null || matcher.match(value, path)) {
                            matches = true
                            get(key)?.add(file)
                        }
                        current[key] = value.takeIf { !includeNested || !matches }
                    }

                    setValueForChildren(current)
                    return true
                }