diff options
author | Jonathan Tripathy <jt@puppetlabs.com> | 2015-06-22 15:22:16 +0100 |
---|---|---|
committer | Jonathan Tripathy <jt@puppetlabs.com> | 2015-06-22 15:22:16 +0100 |
commit | ae60f5ccb7c00a0e162a06ba05d247688ffbce4b (patch) | |
tree | adcf2aa8966df1c28f13242d4501a3f202b650ed /lib | |
parent | d08d16bd71e10f439dfa3ff92626aeb38aa95303 (diff) |
MODULES-2131 Git provider now takes account of revision property when using depth property.
Diffstat (limited to 'lib')
-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 13e0793..4603029 100644 --- a/lib/puppet/provider/vcsrepo/git.rb +++ b/lib/puppet/provider/vcsrepo/git.rb @@ -125,6 +125,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(:ensure) == :bare args << '--bare' |