Skip to content

Commit

Permalink
Clone git repository with --recursively
Browse files Browse the repository at this point in the history
Not doing so results in submodules not being checked out.
  • Loading branch information
mmalecki committed Jan 29, 2012
1 parent 26b66a8 commit 9b15ea3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion features/support/step_definitions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def decode(string)

Then /^it (successfully|fails to) clones? the repository with git$/ do |result|
$shell.expects(:execute).
with("git clone --depth=100 --quiet git://github.com/#{$payload.repository.slug}.git #{$payload.repository.slug}").
with("git clone --depth=100 --quiet --recursive git://github.com/#{$payload.repository.slug}.git #{$payload.repository.slug}").
outputs('git clone').
returns(result == 'successfully').
in_sequence($sequence)
Expand Down
2 changes: 1 addition & 1 deletion lib/travis/build/scm/git.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def fetch(source, hash, target)

def clone(source, target)
shell.export('GIT_ASKPASS', 'echo', :echo => false) # this makes git interactive auth fail
shell.execute("git clone --depth=100 --quiet #{source} #{target}")
shell.execute("git clone --depth=100 --quiet --recursive #{source} #{target}")
end
assert :clone

Expand Down
2 changes: 1 addition & 1 deletion spec/build/scm/git_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
end

it 'clones the repository' do
shell.expects(:execute).with('git clone --depth=100 --quiet git://example.com/travis-ci.git travis-ci').returns(true)
shell.expects(:execute).with('git clone --depth=100 --quiet --recursive git://example.com/travis-ci.git travis-ci').returns(true)
scm.fetch(source, commit, target)
end

Expand Down

0 comments on commit 9b15ea3

Please sign in to comment.