From d6f233e759f5424f32192c2059c097104b55e86b Mon Sep 17 00:00:00 2001 From: Brett Lentz Date: Tue, 14 Sep 2010 14:14:45 -0700 Subject: git: rework how to do excludes --- lib/puppet/provider/vcsrepo/git.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'lib/puppet') diff --git a/lib/puppet/provider/vcsrepo/git.rb b/lib/puppet/provider/vcsrepo/git.rb index 38c247b..bbcf14c 100644 --- a/lib/puppet/provider/vcsrepo/git.rb +++ b/lib/puppet/provider/vcsrepo/git.rb @@ -221,11 +221,7 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo) end def set_excludes - open(File.join(@resource.value(:path), '.git/info/exclude'), 'w') do |f| - @resource.value(:excludes).each do |ex| - f.write(ex + "\n") - end - end + at_path { open('.git/info/exclude', 'w') { |f| @resource.value(:excludes).each { |ex| f.write(ex + "\n") }}} end def get_revision(rev) -- cgit v1.2.3