1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

sync_default_gems.rb: Show the progress at fetching

It looks like hanging up when fetching from a remote first time.
This commit is contained in:
Nobuyoshi Nakada 2019-11-04 09:38:34 +09:00
parent cbbdb4e5a2
commit 823f25bb96
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -226,7 +226,7 @@ def sync_default_gems_with_commits(gem, range)
`git remote add #{gem} git@github.com:#{$repositories[gem.to_sym]}.git` `git remote add #{gem} git@github.com:#{$repositories[gem.to_sym]}.git`
end end
end end
`git fetch --no-tags #{gem}` system(*%W"git fetch --no-tags #{gem}")
commits = IO.popen(%W"git log --format=%H,%s #{range}") do |f| commits = IO.popen(%W"git log --format=%H,%s #{range}") do |f|
f.read.split("\n").reverse.map{|commit| commit.split(',', 2)} f.read.split("\n").reverse.map{|commit| commit.split(',', 2)}