Commit 8a68f912 authored by Stan Hu's avatar Stan Hu

Fix return nil Rubocop offenses

parent 9d3e413a
...@@ -34,7 +34,7 @@ module Gitlab ...@@ -34,7 +34,7 @@ module Gitlab
blob_entry = find_entry_by_path(repository, root_tree.oid, *path.split('/')) 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 if blob_entry[:type] == :commit
submodule_blob(blob_entry, path, sha) submodule_blob(blob_entry, path, sha)
...@@ -77,10 +77,10 @@ module Gitlab ...@@ -77,10 +77,10 @@ module Gitlab
entry[:name] == path_parts[0] entry[:name] == path_parts[0]
end end
return nil unless entry return unless entry
if path_parts.size > 1 if path_parts.size > 1
return nil unless entry[:type] == :tree return unless entry[:type] == :tree
path_parts.shift path_parts.shift
find_entry_by_path(repository, entry[:oid], *path_parts) find_entry_by_path(repository, entry[:oid], *path_parts)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment