summaryrefslogtreecommitdiff
path: root/lib/puppet/provider/vcsrepo
diff options
context:
space:
mode:
authorWłodzimierz Gajda <gajdaw@gajdaw.pl>2014-10-22 10:02:29 +0200
committerWłodzimierz Gajda <gajdaw@gajdaw.pl>2015-01-29 11:20:12 +0100
commit28f8646e4669bacf7a87ffc8694715333355cd32 (patch)
tree636aa98a47b215bdeda7a62473c192bc58b93e7f /lib/puppet/provider/vcsrepo
parent56e2795091b153cf7ef175f2441a43cc9c315d91 (diff)
downloadpuppet-vcsrepo-28f8646e4669bacf7a87ffc8694715333355cd32.tar.gz
puppet-vcsrepo-28f8646e4669bacf7a87ffc8694715333355cd32.tar.bz2
Use branch parameter
Diffstat (limited to 'lib/puppet/provider/vcsrepo')
-rw-r--r--lib/puppet/provider/vcsrepo/git.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/puppet/provider/vcsrepo/git.rb b/lib/puppet/provider/vcsrepo/git.rb
index 9d3f7f3..8a8c12f 100644
--- a/lib/puppet/provider/vcsrepo/git.rb
+++ b/lib/puppet/provider/vcsrepo/git.rb
@@ -5,7 +5,7 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo)
commands :git => 'git'
- has_features :bare_repositories, :reference_tracking, :ssh_identity, :multiple_remotes, :user, :depth, :submodules
+ has_features :bare_repositories, :reference_tracking, :ssh_identity, :multiple_remotes, :user, :depth, :branch, :submodules
def create
if @resource.value(:revision) and @resource.value(:ensure) == :bare
@@ -180,6 +180,9 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo)
if @resource.value(:depth) and @resource.value(:depth).to_i > 0
args.push('--depth', @resource.value(:depth).to_s)
end
+ if @resource.value(:branch)
+ args.push('--branch', @resource.value(:branch).to_s)
+ end
if @resource.value(:ensure) == :bare
args << '--bare'
end