diff options
author | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2017-04-06 12:10:03 +0200 |
---|---|---|
committer | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2017-04-06 12:10:03 +0200 |
commit | 70982bb420ad69e354db9b6999feed4e4fab9dc1 (patch) | |
tree | 1b4f66af28813ba2582dc3e2b0008895f4626109 | |
parent | 47907a417214e3d5c1ce350307795241f0cada38 (diff) | |
download | gitlab-ce-use-gitaly-find-ref-name.tar.gz |
Hopefully this worksuse-gitaly-find-ref-name
-rw-r--r-- | lib/gitlab/git/repository.rb | 2 | ||||
-rw-r--r-- | spec/models/environment_spec.rb | 2 |
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 |