diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-06-22 13:35:49 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-06-22 13:35:49 +0000 |
commit | 510e45fd1e642303512158a33dc6971da43cb214 (patch) | |
tree | aec8075dd70a0e1914a0dcbfea766f548e23aa79 /lib | |
parent | 5ef58816f5f5e1555c2609b9086900092fbb3751 (diff) | |
parent | 21c4ffe36f1b6da3accd9c1a4eca51be25834478 (diff) | |
download | gitlab-ce-510e45fd1e642303512158a33dc6971da43cb214.tar.gz |
Merge branch 'zj-find-ref-name' into 'master'
FindRefName RPC now mandatory
Closes gitaly#221
See merge request gitlab-org/gitlab-ce!20090
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/git/repository.rb | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index d79c4107200..0904e1c2973 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -607,17 +607,7 @@ module Gitlab def ref_name_for_sha(ref_path, sha) raise ArgumentError, "sha can't be empty" unless sha.present? - gitaly_migrate(:find_ref_name) do |is_enabled| - if is_enabled - gitaly_ref_client.find_ref_name(sha, ref_path) - else - args = %W(for-each-ref --count=1 #{ref_path} --contains #{sha}) - - # Not found -> ["", 0] - # Found -> ["b8d95eb4969eefacb0a58f6a28f6803f8070e7b9 commit\trefs/environments/production/77\n", 0] - run_git(args).first.split.last - end - end + gitaly_ref_client.find_ref_name(sha, ref_path) end # Get refs hash which key is is the commit id |