Ignore symlinks in repository statistics

This commit is contained in:
Paul Chaignon
2015-02-28 16:08:16 +01:00
parent 8a0ff14d22
commit 730be65514
3 changed files with 272 additions and 2 deletions

View File

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