Fixed an issue with 8e51aebd4c that broke git when you didn't specify a revision
This commit is contained in:
@@ -51,6 +51,8 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo)
|
|||||||
def revision
|
def revision
|
||||||
update_references
|
update_references
|
||||||
current = at_path { git_with_identity('rev-parse', 'HEAD').chomp }
|
current = at_path { git_with_identity('rev-parse', 'HEAD').chomp }
|
||||||
|
return current unless @resource.value(:revision)
|
||||||
|
|
||||||
if tag_revision?(@resource.value(:revision))
|
if tag_revision?(@resource.value(:revision))
|
||||||
canonical = at_path { git_with_identity('show', @resource.value(:revision)).scan(/commit (.*)/).to_s }
|
canonical = at_path { git_with_identity('show', @resource.value(:revision)).scan(/commit (.*)/).to_s }
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user