Mode must always be a String

This commit is contained in:
Vicent Marti
2014-06-16 17:31:44 +02:00
parent cd58a30c7c
commit 463f48f04f
4 changed files with 6 additions and 5 deletions

View File

@@ -81,7 +81,8 @@ module Linguist
next if delta.binary
if [:added, :modified].include? delta.status
blob = Linguist::LazyBlob.new(repository, delta.new_file[:oid], new, delta.new_file[:mode])
mode = delta.new_file[:mode].to_s(8)
blob = Linguist::LazyBlob.new(repository, delta.new_file[:oid], new, mode)
# Skip vendored or generated blobs
next if blob.vendored? || blob.generated? || blob.language.nil?