bail fast on file extensions we recognize as binary

This commit is contained in:
Aman Gupta
2011-11-23 00:32:14 -08:00
parent e445438333
commit 4b9a1c297b
2 changed files with 12 additions and 0 deletions

View File

@@ -67,6 +67,9 @@ module Linguist
return if @computed_stats
@enum.each do |blob|
# Skip binary file extensions
next if blob.binary_mime_type?
# Skip vendored or generated blobs
next if blob.vendored? || blob.generated? || blob.language.nil?