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`
##### 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
......
......@@ -15,10 +15,17 @@ module Pod
CLAide::Argument.new('BRANCH', false),
]
def self.options
[
['--progress', 'Show the progress of cloning the spec repository'],
].concat(super)
end
def initialize(argv)
@name = argv.shift_argument
@url = argv.shift_argument
@branch = argv.shift_argument
@progress = argv.flag?('progress')
super
end
......@@ -66,9 +73,20 @@ module Pod
# @return [void]
#
def clone_repo
Dir.chdir(config.repos_dir) do
command = ['clone', @url, @name]
git!(command)
changes = if @progress
{ :verbose => true }
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
......
......@@ -50,7 +50,7 @@ module Pod
# @return [void]
#
def add_master_repo
cmd = ['master', url, 'master']
cmd = ['master', url, 'master', '--progress']
Repo::Add.parse(cmd).run
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