Method: Metaverse::Repo#checkout
- Defined in:
- lib/metaverse/repo.rb
#checkout(ref) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/metaverse/repo.rb', line 35 def checkout ref if @repo.branches[ref].nil? is_reference = false if Rugged::Reference.valid_name?(ref) and @repo.references[ref].nil? raise Errors::ref_not_found ref end end @previous_branches.push current_branch Dir.chdir(@repo.workdir) do `git checkout #{ref}`#TODO: find out what's going on, check out a branch end end |