diff options
author | Nick Thomas <nick@gitlab.com> | 2018-04-17 17:37:08 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-04-17 17:37:08 +0000 |
commit | b3ed751c0e7ada9c2a1a3dd1b758638ff9640bd2 (patch) | |
tree | 2fa88f98866ff1ff3ed587ceb78565838638a0d8 | |
parent | 8feab9494b65b2854175cfbcf595a103b36a45ea (diff) | |
parent | 5173bc8a4c38eebe28f1afd42a4f7bef3d4854cb (diff) | |
download | gitlab-ce-b3ed751c0e7ada9c2a1a3dd1b758638ff9640bd2.tar.gz |
Merge branch 'zj-ref-exists-opt-out' into 'master'
Move Gitaly RefExists check to OPT_OUT
Closes gitaly#401
See merge request gitlab-org/gitlab-ce!18333
-rw-r--r-- | changelogs/unreleased/zj-ref-exists-opt-out.yml | 5 | ||||
-rw-r--r-- | lib/gitlab/git/repository.rb | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/changelogs/unreleased/zj-ref-exists-opt-out.yml b/changelogs/unreleased/zj-ref-exists-opt-out.yml new file mode 100644 index 00000000000..cdffecb0d0a --- /dev/null +++ b/changelogs/unreleased/zj-ref-exists-opt-out.yml @@ -0,0 +1,5 @@ +--- +title: Check if a ref exists is done by Gitaly by default +merge_request: +author: +type: performance diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index 294475be9c6..3124c426f97 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -300,7 +300,8 @@ module Gitlab # # Ref names must start with `refs/`. def ref_exists?(ref_name) - gitaly_migrate(:ref_exists) do |is_enabled| + gitaly_migrate(:ref_exists, + status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT) do |is_enabled| if is_enabled gitaly_ref_exists?(ref_name) else |