Class: Flux::RCS::Branches

Inherits:
Thor
  • Object
show all
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 options[:public]
    git.push({}, 'origin', "+#{branch_id}:#{branch_id}")
    git.branch({:set_upstream => true}, branch_id, "origin/#{branch_id}")
  end
end

#currentObject



9
10
11
# File 'lib/flux/rcs/git.rb', line 9

def current
  repo.head.name.tap { |h| $stdout.puts h }
end