summaryrefslogtreecommitdiff
path: root/lib/puppet/provider/vcsrepo
diff options
context:
space:
mode:
authorNate Mueller <nate@nearbuysystems.com>2011-07-27 19:52:03 -0700
committerNate Mueller <nate@nearbuysystems.com>2011-07-27 19:52:03 -0700
commit16e2e1efc2cc41f603cf499394d3c117a301a078 (patch)
tree06425a0e54d5b30008b0a3eecf94fc24502afae9 /lib/puppet/provider/vcsrepo
parent93815a9e4a4a953239d10eafada533aee16e9038 (diff)
downloadpuppet-vcsrepo-16e2e1efc2cc41f603cf499394d3c117a301a078.tar.gz
puppet-vcsrepo-16e2e1efc2cc41f603cf499394d3c117a301a078.tar.bz2
Fixed an issue with 8e51aebd4cf77c7d68ee that broke git when you didn't specify a revision
Diffstat (limited to 'lib/puppet/provider/vcsrepo')
-rw-r--r--lib/puppet/provider/vcsrepo/git.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/puppet/provider/vcsrepo/git.rb b/lib/puppet/provider/vcsrepo/git.rb
index 4fbb534..e624b49 100644
--- a/lib/puppet/provider/vcsrepo/git.rb
+++ b/lib/puppet/provider/vcsrepo/git.rb
@@ -51,6 +51,8 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo)
def revision
update_references
current = at_path { git_with_identity('rev-parse', 'HEAD').chomp }
+ return current unless @resource.value(:revision)
+
if tag_revision?(@resource.value(:revision))
canonical = at_path { git_with_identity('show', @resource.value(:revision)).scan(/commit (.*)/).to_s }
else