summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gerwitz <gerwitzm@lovullo.com>2013-12-02 11:24:15 -0500
committerMike Gerwitz <gerwitzm@lovullo.com>2013-12-02 11:24:21 -0500
commit4689c514a12764933a9cb1e2858343f0ba5923b3 (patch)
treefbfc4389d7dd8d9ff7e9968c4ecf57036c0b5e26
parentf2f1a82d72ec8afb50c32206abeaa32923ee410b (diff)
downloadpuppet-vcsrepo-4689c514a12764933a9cb1e2858343f0ba5923b3.tar.gz
puppet-vcsrepo-4689c514a12764933a9cb1e2858343f0ba5923b3.tar.bz2
origin/HEAD is not valid; use origin/master for latest when branch == 'master'
-rw-r--r--lib/puppet/provider/vcsrepo/git.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/puppet/provider/vcsrepo/git.rb b/lib/puppet/provider/vcsrepo/git.rb
index 47e84d2..6bc1c3d 100644
--- a/lib/puppet/provider/vcsrepo/git.rb
+++ b/lib/puppet/provider/vcsrepo/git.rb
@@ -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)