summaryrefslogtreecommitdiff
path: root/lib/puppet
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2011-11-26 00:51:31 -0800
committerJames Turnbull <james@lovedthanlost.net>2011-11-26 00:51:31 -0800
commit33cca5123c5563ca87432694c374383dc826decd (patch)
treef73d1bd164583a855ae8b5d68532d3a8747192e0 /lib/puppet
parentb4d763cef69e94301351c7eeef5b22c75c8bc6dd (diff)
parent89e2583aa9c3166bb163a6d195784a543ff02f34 (diff)
downloadpuppet-vcsrepo-33cca5123c5563ca87432694c374383dc826decd.tar.gz
puppet-vcsrepo-33cca5123c5563ca87432694c374383dc826decd.tar.bz2
Merge pull request #14 from webfactory/fix_10788
Fix (#10788) - Avoid unnecessary remote operations in the vcsrepo type
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/type/vcsrepo.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/type/vcsrepo.rb b/lib/puppet/type/vcsrepo.rb
index 655549a..9824726 100644
--- a/lib/puppet/type/vcsrepo.rb
+++ b/lib/puppet/type/vcsrepo.rb
@@ -76,7 +76,7 @@ Puppet::Type.newtype(:vcsrepo) do
prov = @resource.provider
if prov
if prov.working_copy_exists?
- prov.latest? ? :latest : :present
+ (@should.include?(:latest) && prov.latest?) ? :latest : :present
elsif prov.class.feature?(:bare_repositories) and prov.bare_exists?
:bare
else