Commit 581c5edb authored by Danielle Tomlinson's avatar Danielle Tomlinson Committed by GitHub

Merge pull request #6364 from CocoaPods/dani_git_progress

[Repo::Add] Add --progress option to show git progress
parents 469e9a24 fae712fe
...@@ -8,7 +8,9 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -8,7 +8,9 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Enhancements ##### Enhancements
* None. * Show git progress when downloading the CocoaPods Specs repo.
[Danielle Tomlinson](https://github.com/dantoml)
[#5937](https://github.com/CocoaPods/CocoaPods/issues/5937)
##### Bug Fixes ##### Bug Fixes
......
...@@ -15,10 +15,17 @@ module Pod ...@@ -15,10 +15,17 @@ module Pod
CLAide::Argument.new('BRANCH', false), CLAide::Argument.new('BRANCH', false),
] ]
def self.options
[
['--progress', 'Show the progress of cloning the spec repository'],
].concat(super)
end
def initialize(argv) def initialize(argv)
@name = argv.shift_argument @name = argv.shift_argument
@url = argv.shift_argument @url = argv.shift_argument
@branch = argv.shift_argument @branch = argv.shift_argument
@progress = argv.flag?('progress')
super super
end end
...@@ -66,9 +73,20 @@ module Pod ...@@ -66,9 +73,20 @@ module Pod
# @return [void] # @return [void]
# #
def clone_repo def clone_repo
Dir.chdir(config.repos_dir) do changes = if @progress
command = ['clone', @url, @name] { :verbose => true }
git!(command) else
{}
end
config.with_changes(changes) do
Dir.chdir(config.repos_dir) do
command = ['clone', @url, @name]
if @progress
command << '--progress'
end
git!(command)
end
end end
end end
......
...@@ -50,7 +50,7 @@ module Pod ...@@ -50,7 +50,7 @@ module Pod
# @return [void] # @return [void]
# #
def add_master_repo def add_master_repo
cmd = ['master', url, 'master'] cmd = ['master', url, 'master', '--progress']
Repo::Add.parse(cmd).run Repo::Add.parse(cmd).run
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment