Class: Flux::RCS::Branches
- Inherits:
-
Thor
- Object
- Thor
- Flux::RCS::Branches
- Defined in:
- lib/flux/rcs/git.rb
Instance Method Summary collapse
Instance Method Details
#checkout(branch_id) ⇒ Object
14 15 16 |
# File 'lib/flux/rcs/git.rb', line 14 def checkout(branch_id) git.checkout({}, branch_id) end |
#create(branch_id) ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/flux/rcs/git.rb', line 20 def create(branch_id) git.branch({}, branch_id) if [:public] git.push({}, 'origin', "+#{branch_id}:#{branch_id}") git.branch({:set_upstream => true}, branch_id, "origin/#{branch_id}") end end |
#current ⇒ Object
9 10 11 |
# File 'lib/flux/rcs/git.rb', line 9 def current repo.head.name.tap { |h| $stdout.puts h } end |