From 328d88ee590e6fa7ee64806fbfd9e09fa5ead979 Mon Sep 17 00:00:00 2001 From: Scott O'Neil Date: Tue, 8 Nov 2011 18:46:41 -0600 Subject: [PATCH] Run update_owner_and_excludes after update_preferences and get_revision These are called when the type is retrieve'd. Without this, the ownerships for any .git metafiles fetch'd durring the retrieve will be owned by root. This patch fixes that by invoking update_owner_and_excludes after fetch'ng --- lib/puppet/provider/vcsrepo/git.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/puppet/provider/vcsrepo/git.rb b/lib/puppet/provider/vcsrepo/git.rb index 51e48a9..6cbda67 100644 --- a/lib/puppet/provider/vcsrepo/git.rb +++ b/lib/puppet/provider/vcsrepo/git.rb @@ -96,6 +96,7 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo) def update_references at_path do git_with_identity('fetch', '--tags', 'origin') + update_owner_and_excludes end end @@ -262,6 +263,7 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo) end current = @resource.value(:revision) if current == canonical end + update_owner_and_excludes return current end