Fixed an issue with 8e51aebd4c that broke git when you didn't specify a revision

This commit is contained in:
Nate Mueller
2011-07-27 19:52:03 -07:00
parent 93815a9e4a
commit 16e2e1efc2

View File

@@ -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