Method: Git::Base#with_temp_working
- Defined in:
- lib/git/base.rb
#with_temp_working(&blk) ⇒ Object
505 506 507 508 509 510 511 512 |
# File 'lib/git/base.rb', line 505 def with_temp_working &blk tempfile = Tempfile.new("temp-workdir") temp_dir = tempfile.path tempfile.close tempfile.unlink Dir.mkdir(temp_dir, 0700) with_working(temp_dir, &blk) end |