Use proper format for symlinks, submodules and trees

This commit is contained in:
Paul Chaignon
2015-07-04 17:14:30 +02:00
parent 730be65514
commit f98e6bdac7

View File

@@ -152,7 +152,8 @@ module Linguist
if [:added, :modified].include? delta.status
# Skip submodules and symlinks
mode = delta.new_file[:mode]
next if (mode & 0040000) != 0 || (mode & 0120000) != 0
mode_format = (mode & 0170000)
next if mode_format == 0120000 || mode_format == 040000 || mode_format == 0160000
blob = Linguist::LazyBlob.new(repository, delta.new_file[:oid], new, mode.to_s(8))