diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2018-09-21 13:58:45 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2018-09-21 14:29:59 -0300 |
commit | 951144536a7e87f66564eb8e85e7aa3dc1b1e748 (patch) | |
tree | ed966230b60090218a70cbd8b2a4070782c38cc8 /app/models | |
parent | 8f191590447d8e8aa375f1c1104540db5473ce51 (diff) | |
download | gitlab-ce-951144536a7e87f66564eb8e85e7aa3dc1b1e748.tar.gz |
Doesn't synchronize default branch for push mirrors
We should not synchronize the source repository with
the target root ref while updating a push mirror.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/project.rb | 6 | ||||
-rw-r--r-- | app/models/repository.rb | 1 |
2 files changed, 0 insertions, 7 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 9e4c7f7a2d0..73260cc7885 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -2076,12 +2076,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) |