diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/git/rugged_impl/blob.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/git/rugged_impl/blob.rb b/lib/gitlab/git/rugged_impl/blob.rb index 26c82a1a7e4..11ee4ebda4b 100644 --- a/lib/gitlab/git/rugged_impl/blob.rb +++ b/lib/gitlab/git/rugged_impl/blob.rb @@ -34,7 +34,7 @@ module Gitlab blob_entry = find_entry_by_path(repository, root_tree.oid, *path.split('/')) - return nil unless blob_entry + return unless blob_entry if blob_entry[:type] == :commit submodule_blob(blob_entry, path, sha) @@ -77,10 +77,10 @@ module Gitlab entry[:name] == path_parts[0] end - return nil unless entry + return unless entry if path_parts.size > 1 - return nil unless entry[:type] == :tree + return unless entry[:type] == :tree path_parts.shift find_entry_by_path(repository, entry[:oid], *path_parts) |