summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/gitlab/git/repository.rb2
-rw-r--r--spec/models/environment_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index 4fe6f340ee9..9e338282e96 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -456,7 +456,7 @@ module Gitlab
def ref_name_for_sha(ref_path, sha)
Gitlab::GitalyClient.migrate(:find_ref_name) do |is_enabled|
if is_enabled
- Gitlab::GitalyClient::Ref.find_ref_name(self, sha, ref_path)
+ gitaly_ref_client.find_ref_name(sha, ref_path)
else
args = %W(#{Gitlab.config.git.bin_path} for-each-ref --count=1 #{ref_path} --contains #{sha})
diff --git a/spec/models/environment_spec.rb b/spec/models/environment_spec.rb
index c8f4e9ff50e..af7753caba6 100644
--- a/spec/models/environment_spec.rb
+++ b/spec/models/environment_spec.rb
@@ -116,7 +116,7 @@ describe Environment, models: true do
end
it 'calls GitalyClient' do
- expect(Gitlab::GitalyClient::Ref).to receive(:find_ref_name).with(project.repository.raw_repository, commit.id, environment.ref_path)
+ expect_any_instance_of(Gitlab::GitalyClient::Ref).to receive(:find_ref_name)
environment.first_deployment_for(commit)
end