diff options
author | Felipe Reyes <freyes@tty.cl> | 2014-01-02 18:13:40 -0300 |
---|---|---|
committer | Felipe Reyes <freyes@tty.cl> | 2014-01-07 16:03:29 -0300 |
commit | 0ea16bba47cf177dc17fa14f20d54d0091a09865 (patch) | |
tree | f411e569543eadd3f4695a7aa474b47678f649eb /lib/puppet/type | |
parent | e4eb8ab551d41c6d4d96cc3d0c4bc3186d4ed74d (diff) |
Add the option to shallow clones with git
The new parameter used to indicate that you want a shallow clone is `:depth`
Diffstat (limited to 'lib/puppet/type')
-rw-r--r-- | lib/puppet/type/vcsrepo.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/puppet/type/vcsrepo.rb b/lib/puppet/type/vcsrepo.rb index ad90ced..1dab2b9 100644 --- a/lib/puppet/type/vcsrepo.rb +++ b/lib/puppet/type/vcsrepo.rb @@ -37,6 +37,9 @@ Puppet::Type.newtype(:vcsrepo) do feature :cvs_rsh, "The provider understands the CVS_RSH environment variable" + feature :depth, + "The provider can do shallow clones" + ensurable do attr_accessor :latest @@ -191,6 +194,10 @@ Puppet::Type.newtype(:vcsrepo) do desc "The value to be used for the CVS_RSH environment variable." end + newparam :depth, :required_features => [:depth] do + desc "The value to be used to do a shallow clone." + end + autorequire(:package) do ['git', 'git-core'] end |