From 89e2583aa9c3166bb163a6d195784a543ff02f34 Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Sat, 12 Nov 2011 13:27:56 +0100 Subject: [PATCH] Fix (#10788) - Avoid unnecessary remote operations in the vcsrepo type --- lib/puppet/type/vcsrepo.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet/type/vcsrepo.rb b/lib/puppet/type/vcsrepo.rb index 9bf8311..83a8318 100644 --- a/lib/puppet/type/vcsrepo.rb +++ b/lib/puppet/type/vcsrepo.rb @@ -73,7 +73,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