зеркало из https://github.com/github/ruby.git
Add workaround for some CIs
https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian8/ruby-master/log/20190824T093005Z.fail.html.gz ``` branches: * trunk remotes/origin/trunk ``` and ``` fatal: Remote branch master not found in upstream origin ```
This commit is contained in:
Родитель
5d5502dc85
Коммит
df348310dc
|
@ -540,9 +540,17 @@ class VCS
|
|||
end
|
||||
|
||||
def export(revision, url, dir, keep_temp = false)
|
||||
puts "branches:"; system(COMMAND, "branch", "-a") # for debug
|
||||
ret = system(COMMAND, "clone", "-s", (@srcdir || '.').to_s, "-b", url, dir)
|
||||
ret
|
||||
rescue => e
|
||||
if "master" == url.to_str && e.message == "Command failed with exit 128: git"
|
||||
warn "retry trunk instead of master", uplevel: 0
|
||||
STDERR.puts "existing branches:"
|
||||
system(COMMAND, "branch", "-a", 1 => 2)
|
||||
url = Branch.new("trunk")
|
||||
retry
|
||||
end
|
||||
raise
|
||||
end
|
||||
|
||||
def after_export(dir)
|
||||
|
|
Загрузка…
Ссылка в новой задаче