Skip to content

Commit 89f9f5a

Browse files
jplindquistsmortex
andauthored
Apply suggestions from code review
Co-authored-by: Romain Tartière <romain@blogreen.org>
1 parent 204931d commit 89f9f5a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ vcsrepo { '/path/to/repo':
687687
vcsrepo { '/path/to/repo':
688688
ensure => present,
689689
provider => git,
690-
source => 'http://svnrepo/hello/trunk',
690+
source => 'git@example.com:project.git',
691691
includes => [
692692
'root-file.txt',
693693
'checkout-folder',

lib/puppet/provider/vcsrepo/git.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ def includes
9696
return nil if bare_exists?
9797

9898
at_path do
99-
return nil unless File.file?(File.join(@resource.value(:path), '.git/info/sparse-checkout'))
100-
File.readlines(File.join(@resource.value(:path), '.git/info/sparse-checkout')).map(&:chomp)
99+
return nil unless File.file?('.git/info/sparse-checkout')
100+
File.readlines('.git/info/sparse-checkout').map(&:chomp)
101101
end
102102
end
103103

@@ -438,7 +438,7 @@ def configure_sparse_checkout
438438
exec_git('config', '--local', '--bool', 'core.sparseCheckout', 'true')
439439

440440
# Includes may be an Array or a String
441-
File.open(File.join(@resource.value(:path), '.git/info/sparse-checkout'), 'w') do |f|
441+
File.open('.git/info/sparse-checkout', 'w') do |f|
442442
if @resource.value(:includes).respond_to?(:each)
443443
@resource.value(:includes).each { |inc| f.puts inc }
444444
else

0 commit comments

Comments
 (0)