diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-11-15 15:55:52 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-11-15 15:55:52 +0000 |
commit | f31fb4cd0cec388b610f29e5231b5e9168a3941c (patch) | |
tree | d70381ef5557b5a579c6b0f42b7a125f4bf4a525 | |
parent | 7b34d828f7082711d315cc09a450cc3e9b7e7ee2 (diff) | |
parent | 54533920bc81319159297c7f7c1c8c2451baf151 (diff) | |
download | gitlab-ce-f31fb4cd0cec388b610f29e5231b5e9168a3941c.tar.gz |
Merge branch '40186-the-ee_compat_check-job-sometimes-fail-on-the-git-apply-3way-step-for-forks' into 'master'
Always fetch master from the canonical remote
Closes #40186
See merge request gitlab-org/gitlab-ce!15399
-rw-r--r-- | lib/gitlab/ee_compat_check.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/ee_compat_check.rb b/lib/gitlab/ee_compat_check.rb index 0ea534a5fd0..efc2e46d289 100644 --- a/lib/gitlab/ee_compat_check.rb +++ b/lib/gitlab/ee_compat_check.rb @@ -193,7 +193,7 @@ module Gitlab # Repository is initially cloned with a depth of 20 so we need to fetch # deeper in the case the branch has more than 20 commits on top of master fetch(branch: branch, depth: depth) - fetch(branch: 'master', depth: depth) + fetch(branch: 'master', depth: depth, remote: DEFAULT_CE_PROJECT_URL) merge_base_found? end @@ -201,10 +201,10 @@ module Gitlab raise "\n#{branch} is too far behind master, please rebase it!\n" unless success end - def fetch(branch:, depth:) + def fetch(branch:, depth:, remote: 'origin') step( "Fetching deeper...", - %W[git fetch --depth=#{depth} --prune origin +refs/heads/#{branch}:refs/remotes/origin/#{branch}] + %W[git fetch --depth=#{depth} --prune #{remote} +refs/heads/#{branch}:refs/remotes/origin/#{branch}] ) do |output, status| raise "Fetch failed: #{output}" unless status.zero? end |