diff options
author | James Turnbull <james@lovedthanlost.net> | 2010-05-27 17:14:37 +1000 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2010-06-01 10:04:15 +1000 |
commit | 4d40715919b80d599887f4e9618019dce0d15114 (patch) | |
tree | 71f584fc775492b7274b058c9a67113d0295357b /lib/puppet | |
parent | 128e3e4a1dbfa7897c1ec4b6534e79cc2ae30c64 (diff) | |
download | puppet-vcsrepo-4d40715919b80d599887f4e9618019dce0d15114.tar.gz puppet-vcsrepo-4d40715919b80d599887f4e9618019dce0d15114.tar.bz2 |
Fixed git provider to retrieve tags
Diffstat (limited to 'lib/puppet')
-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 e11733b..6395590 100644 --- a/lib/puppet/provider/vcsrepo/git.rb +++ b/lib/puppet/provider/vcsrepo/git.rb @@ -30,6 +30,8 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo) end def revision + fetch + update_references current = at_path { git('rev-parse', 'HEAD') } canonical = at_path { git('rev-parse', @resource.value(:revision)) } if current == canonical @@ -41,6 +43,7 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo) def revision=(desired) fetch + update_references if local_branch_revision?(desired) at_path do git('checkout', desired) |