diff options
author | David Schmitt <david.schmitt@puppetlabs.com> | 2015-06-22 15:27:40 +0100 |
---|---|---|
committer | David Schmitt <david.schmitt@puppetlabs.com> | 2015-06-22 15:27:40 +0100 |
commit | fd63cd94caae3aedcce53b8fad9fd1d5f29139da (patch) | |
tree | e6fc9191be3f358531fb6771f75ba146cbfe7220 /lib/puppet/provider/vcsrepo | |
parent | 4840ffbfbe2db1403979eac2e539a605917470f9 (diff) | |
parent | ae60f5ccb7c00a0e162a06ba05d247688ffbce4b (diff) | |
download | puppet-vcsrepo-fd63cd94caae3aedcce53b8fad9fd1d5f29139da.tar.gz puppet-vcsrepo-fd63cd94caae3aedcce53b8fad9fd1d5f29139da.tar.bz2 |
Merge pull request #255 from jonnytpuppet/depth_fix
MODULES-2131 Git provider now takes account of revision property when using depth property.
Diffstat (limited to 'lib/puppet/provider/vcsrepo')
-rw-r--r-- | lib/puppet/provider/vcsrepo/git.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/puppet/provider/vcsrepo/git.rb b/lib/puppet/provider/vcsrepo/git.rb index 49ac648..8074950 100644 --- a/lib/puppet/provider/vcsrepo/git.rb +++ b/lib/puppet/provider/vcsrepo/git.rb @@ -180,6 +180,9 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo) args = ['clone'] if @resource.value(:depth) and @resource.value(:depth).to_i > 0 args.push('--depth', @resource.value(:depth).to_s) + if @resource.value(:revision) + args.push('--branch', @resource.value(:revision).to_s) + end end if @resource.value(:branch) args.push('--branch', @resource.value(:branch).to_s) |