summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-03-07 05:13:41 -0800
committerStan Hu <stanhu@gmail.com>2019-03-07 05:13:41 -0800
commit8a68f912296983772a1034f60de7f763f167ccec (patch)
treeefa04213397faa8ff032de560759e718f34f9a06
parent9d3e413aa7d2e3ba0c4743f833291a3282eb79fe (diff)
downloadgitlab-ce-8a68f912296983772a1034f60de7f763f167ccec.tar.gz
Fix return nil Rubocop offenses
-rw-r--r--lib/gitlab/git/rugged_impl/blob.rb6
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)