Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2018-09-10 22:12:49 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2018-09-10 22:12:49 +0300
commit8850fb9d671635178c2ef307dcf8df083a7285d6 (patch)
treed2a64514195199e04386499bf4c843888b43b96e /app/services/projects
parent7f0a346ecd48e814eb44741ff30edf5eda3413b8 (diff)
Synchronize the default branch when updating a remote mirror
Diffstat (limited to 'app/services/projects')
-rw-r--r--app/services/projects/update_remote_mirror_service.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/services/projects/update_remote_mirror_service.rb b/app/services/projects/update_remote_mirror_service.rb
index 591b38b8151..85b9eb02803 100644
--- a/app/services/projects/update_remote_mirror_service.rb
+++ b/app/services/projects/update_remote_mirror_service.rb
@@ -5,13 +5,14 @@ module Projects
attr_reader :errors
def execute(remote_mirror)
- @errors = []
-
return success unless remote_mirror.enabled?
+ errors = []
+
begin
remote_mirror.ensure_remote!
repository.fetch_remote(remote_mirror.remote_name, no_tags: true)
+ project.update_root_ref(remote_mirror.remote_name)
opts = {}
if remote_mirror.only_protected_branches?