summaryrefslogtreecommitdiff
path: root/lib/puppet/provider/vcsrepo
diff options
context:
space:
mode:
authorAshley Penney <ashley.penney@puppetlabs.com>2014-04-03 13:58:21 -0400
committerAshley Penney <ashley.penney@puppetlabs.com>2014-04-03 13:58:21 -0400
commit46588aa62d444c5f0a538cccec357a80cd191b93 (patch)
tree8a3efa985baab8edb10ea0705f40ac5a075fc67d /lib/puppet/provider/vcsrepo
parent1e0f7c6427d6aef7cef9a9e2822925b8a7f4f862 (diff)
parent9c873e1c56f1147a8fcdd01b804f744deebb53f6 (diff)
downloadpuppet-vcsrepo-46588aa62d444c5f0a538cccec357a80cd191b93.tar.gz
puppet-vcsrepo-46588aa62d444c5f0a538cccec357a80cd191b93.tar.bz2
Merge pull request #120 from huandu/master
Use `git rev-parse` to get tag canonical revision
Diffstat (limited to 'lib/puppet/provider/vcsrepo')
-rw-r--r--lib/puppet/provider/vcsrepo/git.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/provider/vcsrepo/git.rb b/lib/puppet/provider/vcsrepo/git.rb
index c96095b..b2e893b 100644
--- a/lib/puppet/provider/vcsrepo/git.rb
+++ b/lib/puppet/provider/vcsrepo/git.rb
@@ -52,7 +52,7 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo)
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 }
+ canonical = at_path { git_with_identity('rev-parse', @resource.value(:revision)).chomp }
else
# if it's not a tag, look for it as a local ref
canonical = at_path { git_with_identity('rev-parse', '--revs-only', @resource.value(:revision)).chomp }