diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-04-25 13:16:40 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-04-25 13:16:40 +0900 |
commit | f12f9f511ddf2116ed5da9a580336b148812ad23 (patch) | |
tree | 2f9f9742178e786e0efc3bbb1778aba86c629d79 | |
parent | c2700379add15f8b0e13072a19cabc2cd5957c43 (diff) | |
download | ruby-f12f9f511ddf2116ed5da9a580336b148812ad23.tar.gz |
fetch-bundled_gems.rb: Quiet detached HEAD advice
-rwxr-xr-x | tool/fetch-bundled_gems.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tool/fetch-bundled_gems.rb b/tool/fetch-bundled_gems.rb index 28ae3d4327..bb6f33abff 100755 --- a/tool/fetch-bundled_gems.rb +++ b/tool/fetch-bundled_gems.rb @@ -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 |