diff options
author | Ben Ford <ben.ford@puppetlabs.com> | 2013-03-20 12:31:41 -0700 |
---|---|---|
committer | Ben Ford <ben.ford@puppetlabs.com> | 2013-03-20 12:31:41 -0700 |
commit | f83f79816e71cbd5c92ef01f6cd26e52fa95e6b2 (patch) | |
tree | e266e8b643a8ac61664c1f4c87ff299a5fb158d2 /lib/puppet | |
parent | 3e6a1661831446e042488de30aab900ef6eb17c4 (diff) | |
parent | 2a06eaf53950aa87ef2bfefa134b9bb4e5891e03 (diff) | |
download | puppet-vcsrepo-f83f79816e71cbd5c92ef01f6cd26e52fa95e6b2.tar.gz puppet-vcsrepo-f83f79816e71cbd5c92ef01f6cd26e52fa95e6b2.tar.bz2 |
Merge pull request #58 from sim0nf/fix_regex
Tighten regex to avoid matching the word 'commit' in message
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/provider/vcsrepo/git.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/provider/vcsrepo/git.rb b/lib/puppet/provider/vcsrepo/git.rb index 3a48a6a..6f979cb 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 |