Commit f80f90e8 authored by Samuel Giddins's avatar Samuel Giddins

[Setup] Remove shallow option

parent 2721277a
......@@ -14,20 +14,9 @@ module Pod
If the clone already exists, it will ensure that it is up-to-date.
DESC
def self.options
[
['--no-shallow', 'Clone full history so push will work'],
].concat(super)
end
extend Executable
executable :git
def initialize(argv)
@shallow = argv.flag?('shallow', true)
super
end
def run
UI.section 'Setting up CocoaPods master repo' do
if master_repo_dir.exist?
......@@ -62,7 +51,6 @@ module Pod
#
def add_master_repo
cmd = ['master', url, 'master']
cmd << '--shallow' if @shallow
Repo::Add.parse(cmd).run
end
......
......@@ -61,9 +61,11 @@ module Pod
previous_title_level = UI.title_level
UI.title_level = 0
begin
argv = [name, url]
argv << '--shallow' if name =~ /^master(-\d+)?$/
Command::Repo::Add.new(CLAide::ARGV.new(argv)).run
if name =~ /^master(-\d+)?$/
Command::Setup.parse([]).run
else
Command::Repo::Add.parse([name, url]).run
end
rescue Informative
raise Informative, "Unable to add a source with url `#{url}` " \
"named `#{name}`.\nYou can try adding it manually in " \
......
......@@ -32,23 +32,11 @@ module Pod
url.should == test_repo_path.to_s
end
it 'creates a shallow clone of the `master` repo by default' do
it 'creates a full clone of the `master` repo' do
Dir.chdir(test_repo_path) do
`echo 'touch' > touch && git add touch && git commit -m 'updated'`
end
# Need to use file:// to test local use of --depth=1
Command::Setup.stubs(:read_only_url).returns("file://#{test_repo_path}")
run_command('setup')
Dir.chdir(config.repos_dir + 'master') do
`git log --pretty=oneline`.strip.split("\n").size.should == 1
end
end
it 'creates a full clone of the `master` repo if requested' do
Dir.chdir(test_repo_path) do
`echo 'touch' > touch && git add touch && git commit -m 'updated'`
end
run_command('setup', '--no-shallow')
Dir.chdir(config.repos_dir + 'master') do
`git log --pretty=oneline`.strip.split("\n").size.should > 1
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