Fixed git provider to retrieve tags
authorJames Turnbull <james@lovedthanlost.net>
Thu, 27 May 2010 07:14:37 +0000 (17:14 +1000)
committerJames Turnbull <james@lovedthanlost.net>
Tue, 1 Jun 2010 00:04:15 +0000 (10:04 +1000)
lib/puppet/provider/vcsrepo/git.rb

index e11733b..6395590 100644 (file)
@@ -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)