diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2018-06-22 11:41:07 +0200 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2018-06-22 11:41:07 +0200 |
commit | 21c4ffe36f1b6da3accd9c1a4eca51be25834478 (patch) | |
tree | 147cc6d2504b9578e9c8f18cae60ffbf01a097c4 | |
parent | 9c3214640cfb572af3cc419d159c11bcd5b5e624 (diff) | |
download | gitlab-ce-zj-find-ref-name.tar.gz |
FindRefName RPC now mandatoryzj-find-ref-name
Has never been in OPT_OUT, dispite being ages old. The time where
feature flags are still set by env vars.
Closes https://gitlab.com/gitlab-org/gitaly/issues/221
-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 7056d9c8756..de1ecf18dd8 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -613,17 +613,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 |