Commit 7d23a2bf authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg

Remove legacy storage path call

Storage shards should only be used, the exact paths are the
responsibilty of Gitaly. This will create deprecation warning, and in
this instance the path is initialized, but never used so it could be
removed.
parent 928e45e7
...@@ -12,7 +12,7 @@ module Gitlab ...@@ -12,7 +12,7 @@ module Gitlab
# class. # class.
# #
class RemoteRepository class RemoteRepository
attr_reader :path, :relative_path, :gitaly_repository attr_reader :relative_path, :gitaly_repository
def initialize(repository) def initialize(repository)
@relative_path = repository.relative_path @relative_path = repository.relative_path
...@@ -21,7 +21,6 @@ module Gitlab ...@@ -21,7 +21,6 @@ module Gitlab
# These instance variables will not be available in gitaly-ruby, where # These instance variables will not be available in gitaly-ruby, where
# we have no disk access to this repository. # we have no disk access to this repository.
@repository = repository @repository = repository
@path = repository.path
end end
def empty? def empty?
...@@ -69,6 +68,10 @@ module Gitlab ...@@ -69,6 +68,10 @@ module Gitlab
env env
end end
def path
@repository.path
end
private private
# Must return an object that responds to 'address' and 'storage'. # Must return an object that responds to 'address' and 'storage'.
......
...@@ -1187,6 +1187,8 @@ module Gitlab ...@@ -1187,6 +1187,8 @@ module Gitlab
if is_enabled if is_enabled
gitaly_fetch_ref(source_repository, source_ref: source_ref, target_ref: target_ref) gitaly_fetch_ref(source_repository, source_ref: source_ref, target_ref: target_ref)
else else
# When removing this code, also remove source_repository#path
# to remove deprecated method calls
local_fetch_ref(source_repository.path, source_ref: source_ref, target_ref: target_ref) local_fetch_ref(source_repository.path, source_ref: source_ref, target_ref: target_ref)
end end
end end
......
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