mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
fetch-bundled_gems.rb: Quiet detached HEAD advice
This commit is contained in:
parent
c2700379ad
commit
f12f9f511d
1 changed files with 3 additions and 2 deletions
|
@ -17,8 +17,9 @@ else
|
|||
puts "retrieving #{n} ..."
|
||||
system(*%W"git clone #{u} #{n}") or abort
|
||||
end
|
||||
unless system(*%W"git checkout #{v.sub(/\A(?=\d)/, 'v')}", chdir: n)
|
||||
unless /\A\d/ =~ v and system(*%W"git checkout #{v}", chdir: n)
|
||||
checkout = %w"git checkout -c advice.detachedHead=false"
|
||||
unless system(*checkout, v.sub(/\A(?=\d)/, 'v'), chdir: n)
|
||||
unless /\A\d/ =~ v and system(*checkout, v, chdir: n)
|
||||
abort
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue