delay calls to binary? in guess_language until viewable?, to avoid loading blobs for well known file extensions

This commit is contained in:
Aman Gupta
2011-11-23 00:49:52 -08:00
parent bb4840ca3e
commit 21488c84c3

View File

@@ -368,7 +368,7 @@ module Linguist
#
# Returns a Language or nil
def guess_language
return if binary?
return if binary_mime_type?
# Disambiguate between multiple language extensions
disambiguate_extension_language ||