diff options
author | Aaron Stone <aaron@serendipity.cx> | 2013-07-17 14:25:51 -0700 |
---|---|---|
committer | Aaron Stone <aaron@serendipity.cx> | 2013-07-17 14:25:51 -0700 |
commit | ff2607235cd29114212bd49186319a7bf0980944 (patch) | |
tree | 3932da0e02fd12956825a1f5796e83aa4bc43d87 | |
parent | 76227ed83795b882e0d8cffcff79ea5bab61ab6c (diff) | |
parent | ad6913b81db57f29ab634d353963b66ffb2a814d (diff) |
Merge pull request #46 from Paulche/master
Enable unlimited nesting for submodule updating
-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 536f652..d971e90 100644 --- a/lib/puppet/provider/vcsrepo/git.rb +++ b/lib/puppet/provider/vcsrepo/git.rb @@ -231,10 +231,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 e10fd1e..68b6c0a 100644 --- a/spec/unit/puppet/provider/vcsrepo/git_spec.rb +++ b/spec/unit/puppet/provider/vcsrepo/git_spec.rb @@ -218,11 +218,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 |