origin/HEAD is not valid; use origin/master for latest when branch == 'master'
authorMike Gerwitz <gerwitzm@lovullo.com>
Mon, 2 Dec 2013 16:24:15 +0000 (11:24 -0500)
committerMike Gerwitz <gerwitzm@lovullo.com>
Mon, 2 Dec 2013 16:24:21 +0000 (11:24 -0500)
lib/puppet/provider/vcsrepo/git.rb

index 47e84d2..6bc1c3d 100644 (file)
@@ -39,9 +39,7 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo)
 
   def latest
     branch = on_branch?
-    if branch == 'master'
-      return get_revision("#{@resource.value(:remote)}/HEAD")
-    elsif branch == '(no branch)'
+    if branch == '(no branch)'
       return get_revision('HEAD')
     else
       return get_revision("#{@resource.value(:remote)}/%s" % branch)