Skip to content

Commit

Permalink
Explicitly enable file protocol in submodule test
Browse files Browse the repository at this point in the history
  • Loading branch information
amorde committed Oct 15, 2023
1 parent 7366166 commit e84cb5e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec/git_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ def fixture_url(name)
FileUtils.cp_r(fixture('git-submodule-repo'), '/tmp/')
options = { :git => fixture('git-repo'), :commit => 'd7f4104', :submodules => true }
downloader = Downloader.for_target(tmp_folder, options)
downloader.instance_exec do
# Explicitly allow file transport as newer Git versions
# disable it by default
def target_git(*args)
super('-c', 'protocol.file.allow=always', *args)
end
end
downloader.download
tmp_folder('README').read.strip.should == 'added submodule'
tmp_folder('submodule/README').read.strip.should == 'submodule'
Expand Down

0 comments on commit e84cb5e

Please sign in to comment.