Commit ed699637 authored by Samuel E. Giddins's avatar Samuel E. Giddins

[SourcesManager] Ensure the master repo is shallow cloned

Closes https://github.com/CocoaPods/CocoaPods/issues/2586.
parent 13bd791d
...@@ -44,6 +44,11 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides ...@@ -44,6 +44,11 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
[Samuel Giddins](https://github.com/segiddins) [Samuel Giddins](https://github.com/segiddins)
[#2553](https://github.com/CocoaPods/CocoaPods/issues/2553) [#2553](https://github.com/CocoaPods/CocoaPods/issues/2553)
* Ensures that the master repo is shallow cloned when added via a Podfile
`source` directive.
[Samuel Giddins](https://github.com/segiddins)
[#3586](https://github.com/CocoaPods/CocoaPods/issues/2586)
## 0.34.1 ## 0.34.1
......
...@@ -40,7 +40,9 @@ module Pod ...@@ -40,7 +40,9 @@ module Pod
previous_title_level = UI.title_level previous_title_level = UI.title_level
UI.title_level = 0 UI.title_level = 0
begin begin
Command::Repo::Add.new(CLAide::ARGV.new([name, url])).run argv = [name, url]
argv << '--shallow' if name =~ /^master(-\d+)?$/
Command::Repo::Add.new(CLAide::ARGV.new(argv)).run
rescue Informative => e rescue Informative => e
raise Informative, "Unable to add a source with url `#{url}` " \ raise Informative, "Unable to add a source with url `#{url}` " \
"named `#{name}`.\nYou can try adding it manually in " \ "named `#{name}`.\nYou can try adding it manually in " \
......
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