summaryrefslogtreecommitdiff
path: root/lib/gitlab/git
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2018-04-26 09:50:48 +0200
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2018-04-30 09:02:23 +0200
commit7d23a2bfdf9a67ece2397d19b1d62076559d01cb (patch)
tree6e9964deaad6b18de50ef38bc924e2db895f5b09 /lib/gitlab/git
parent928e45e7d3ac34d4b98bf0d8d57ca6c33e1e924f (diff)
downloadgitlab-ce-7d23a2bfdf9a67ece2397d19b1d62076559d01cb.tar.gz
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.
Diffstat (limited to 'lib/gitlab/git')
-rw-r--r--lib/gitlab/git/remote_repository.rb7
-rw-r--r--lib/gitlab/git/repository.rb2
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/gitlab/git/remote_repository.rb b/lib/gitlab/git/remote_repository.rb
index 6bd6e58feeb..f40e59a8dd0 100644
--- a/lib/gitlab/git/remote_repository.rb
+++ b/lib/gitlab/git/remote_repository.rb
@@ -12,7 +12,7 @@ module Gitlab
# class.
#
class RemoteRepository
- attr_reader :path, :relative_path, :gitaly_repository
+ attr_reader :relative_path, :gitaly_repository
def initialize(repository)
@relative_path = repository.relative_path
@@ -21,7 +21,6 @@ module Gitlab
# These instance variables will not be available in gitaly-ruby, where
# we have no disk access to this repository.
@repository = repository
- @path = repository.path
end
def empty?
@@ -69,6 +68,10 @@ module Gitlab
env
end
+ def path
+ @repository.path
+ end
+
private
# Must return an object that responds to 'address' and 'storage'.
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index 5a6e2e0b937..83b686bc058 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -1187,6 +1187,8 @@ module Gitlab
if is_enabled
gitaly_fetch_ref(source_repository, source_ref: source_ref, target_ref: target_ref)
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)
end
end