diff options
author | Mike Gerwitz <gerwitzm@lovullo.com> | 2013-12-02 11:24:15 -0500 |
---|---|---|
committer | Mike Gerwitz <gerwitzm@lovullo.com> | 2013-12-02 11:24:21 -0500 |
commit | 4689c514a12764933a9cb1e2858343f0ba5923b3 (patch) | |
tree | fbfc4389d7dd8d9ff7e9968c4ecf57036c0b5e26 | |
parent | f2f1a82d72ec8afb50c32206abeaa32923ee410b (diff) | |
download | puppet-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.rb | 4 |
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) |