summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-04-14 15:38:53 -0700
committerStan Hu <stanhu@gmail.com>2018-04-14 15:38:53 -0700
commitcf955af157cb8c2edb05e90d221689d21a1daee3 (patch)
treec6e45486ec18ab9688341f9857bc0eb6bbce097a /lib
parent74e5ec198cbafe5d83690fae970ff73e5ef4cfcb (diff)
downloadgitlab-ce-cf955af157cb8c2edb05e90d221689d21a1daee3.tar.gz
Move uncached_has_local_branches? to a private method
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/git/repository.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index 265707b1d09..294475be9c6 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -242,16 +242,6 @@ module Gitlab
end
end
- def uncached_has_local_branches?
- gitaly_migrate(:has_local_branches, status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT) do |is_enabled|
- if is_enabled
- gitaly_repository_client.has_local_branches?
- else
- has_local_branches_rugged?
- end
- end
- end
-
# Git repository can contains some hidden refs like:
# /refs/notes/*
# /refs/git-as-svn/*
@@ -1570,6 +1560,16 @@ module Gitlab
private
+ def uncached_has_local_branches?
+ gitaly_migrate(:has_local_branches, status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT) do |is_enabled|
+ if is_enabled
+ gitaly_repository_client.has_local_branches?
+ else
+ has_local_branches_rugged?
+ end
+ end
+ end
+
def local_write_ref(ref_path, ref, old_ref: nil, shell: true)
if shell
shell_write_ref(ref_path, ref, old_ref)