summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-04-17 17:37:08 +0000
committerNick Thomas <nick@gitlab.com>2018-04-17 17:37:08 +0000
commitb3ed751c0e7ada9c2a1a3dd1b758638ff9640bd2 (patch)
tree2fa88f98866ff1ff3ed587ceb78565838638a0d8
parent8feab9494b65b2854175cfbcf595a103b36a45ea (diff)
parent5173bc8a4c38eebe28f1afd42a4f7bef3d4854cb (diff)
downloadgitlab-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.yml5
-rw-r--r--lib/gitlab/git/repository.rb3
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