summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSimon Forman <simon@pachube.com>2013-03-18 13:59:56 +0000
committerSimon Forman <simon@pachube.com>2013-03-18 13:59:56 +0000
commit2a06eaf53950aa87ef2bfefa134b9bb4e5891e03 (patch)
treed00b5c134a11872361960849f7eeeb88ac05cb73 /lib
parent0cc694a568cbdc3adf2fea805651f2a30a5c99ac (diff)
downloadpuppet-vcsrepo-2a06eaf53950aa87ef2bfefa134b9bb4e5891e03.tar.gz
puppet-vcsrepo-2a06eaf53950aa87ef2bfefa134b9bb4e5891e03.tar.bz2
Tighten regex to avoid matching the word 'commit' in message
Diffstat (limited to 'lib')
-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 ad69f7d..0e91c23 100644
--- a/lib/puppet/provider/vcsrepo/git.rb
+++ b/lib/puppet/provider/vcsrepo/git.rb
@@ -54,7 +54,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('show', @resource.value(:revision)).scan(/^commit (.*)/).to_s }
else
canonical = at_path { git_with_identity('rev-parse', @resource.value(:revision)).chomp }
end