From f98e6bdac728a32366b8bea25796b572f3e8dc09 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Sat, 4 Jul 2015 17:14:30 +0200 Subject: [PATCH] Use proper format for symlinks, submodules and trees --- lib/linguist/repository.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/linguist/repository.rb b/lib/linguist/repository.rb index b45b825d..181ddf0e 100644 --- a/lib/linguist/repository.rb +++ b/lib/linguist/repository.rb @@ -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))