diff options
-rw-r--r-- | lib/puppet/provider/vcsrepo/git.rb | 5 | ||||
-rw-r--r-- | spec/unit/puppet/provider/vcsrepo/git_spec.rb | 5 |
2 files changed, 2 insertions, 8 deletions
diff --git a/lib/puppet/provider/vcsrepo/git.rb b/lib/puppet/provider/vcsrepo/git.rb index 9254243..66c4d07 100644 --- a/lib/puppet/provider/vcsrepo/git.rb +++ b/lib/puppet/provider/vcsrepo/git.rb @@ -205,10 +205,7 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo) def update_submodules at_path do - git_with_identity('submodule', 'init') - git_with_identity('submodule', 'update') - git_with_identity('submodule', 'foreach', 'git', 'submodule', 'init') - git_with_identity('submodule', 'foreach', 'git', 'submodule', 'update') + git_with_identity('submodule', 'update', '--init', '--recursive') end end diff --git a/spec/unit/puppet/provider/vcsrepo/git_spec.rb b/spec/unit/puppet/provider/vcsrepo/git_spec.rb index 83dbff2..c878941 100644 --- a/spec/unit/puppet/provider/vcsrepo/git_spec.rb +++ b/spec/unit/puppet/provider/vcsrepo/git_spec.rb @@ -176,11 +176,8 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do provider.expects(:git).with('branch', '-a').returns(fixture(:git_branch_a)) provider.expects(:git).with('checkout', '--force', resource.value(:revision)) provider.expects(:git).with('branch', '-a').returns(fixture(:git_branch_a)) - provider.expects(:git).with('submodule', 'init') - provider.expects(:git).with('submodule', 'update') provider.expects(:git).with('branch', '-a').returns(fixture(:git_branch_a)) - provider.expects(:git).with('submodule', 'foreach', 'git', 'submodule', 'init') - provider.expects(:git).with('submodule', 'foreach', 'git', 'submodule', 'update') + provider.expects(:git).with('submodule', 'update', '--init', '--recursive') provider.revision = resource.value(:revision) end end |