Merge pull request #14 from webfactory/fix_10788

Fix (#10788) - Avoid unnecessary remote operations in the vcsrepo type
This commit is contained in:
James Turnbull 2011-11-26 00:51:31 -08:00
commit 33cca5123c

View File

@ -76,7 +76,7 @@ Puppet::Type.newtype(:vcsrepo) do
prov = @resource.provider prov = @resource.provider
if prov if prov
if prov.working_copy_exists? 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? elsif prov.class.feature?(:bare_repositories) and prov.bare_exists?
:bare :bare
else else