diff options
Diffstat (limited to 'lib/puppet/provider/vcsrepo')
-rw-r--r-- | lib/puppet/provider/vcsrepo/git.rb | 2 |
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 |