summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-09-21 19:18:14 +0000
committerStan Hu <stanhu@gmail.com>2018-09-21 19:18:14 +0000
commit12e97d397cde568631eff20984714a20e8e78ebd (patch)
treee58a64b4f1e1447b023d1490afa3a81f0ae020fa /app/models
parent00bb83f7fc6d52583d56fb0f0ea4c9d951535b52 (diff)
parent44bf0c776f50f51fd1b938915854096bd1365635 (diff)
downloadgitlab-ce-12e97d397cde568631eff20984714a20e8e78ebd.tar.gz
Merge branch '51725-push-mirrors-default-branch-reset-to-master' into 'master'
Doesn't synchronize default branch for push mirrors Closes #51725 See merge request gitlab-org/gitlab-ce!21861
Diffstat (limited to 'app/models')
-rw-r--r--app/models/project.rb6
-rw-r--r--app/models/repository.rb1
2 files changed, 0 insertions, 7 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 3e14064a556..0a5099b27b1 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -2078,12 +2078,6 @@ class Project < ActiveRecord::Base
auto_cancel_pending_pipelines == 'enabled'
end
- # Update the default branch querying the remote to determine its HEAD
- def update_root_ref(remote_name)
- root_ref = repository.find_remote_root_ref(remote_name)
- change_head(root_ref) if root_ref.present? && root_ref != default_branch
- end
-
private
# rubocop: disable CodeReuse/ServiceClass
diff --git a/app/models/repository.rb b/app/models/repository.rb
index ad65881ff43..12fbf7d5d1d 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -24,7 +24,6 @@ class Repository
delegate :ref_name_for_sha, to: :raw_repository
delegate :bundle_to_disk, to: :raw_repository
- delegate :find_remote_root_ref, to: :raw_repository
CreateTreeError = Class.new(StandardError)