4 attr_accessor :full, :remote, :name
9 def initialize(base, name)
14 parts = name.split('/')
16 @remote = Git::Remote.new(@base, parts[0])
24 @gcommit = @base.object(name) if !@gcommit
34 # g.branch('new_branch').in_branch do
37 # return true # auto commits and switches back
39 def in_branch (message = 'in branch work')
40 old_current = @base.lib.branch_current
43 @base.commit_all(message)
47 @base.checkout(old_current)
55 @base.lib.branch_delete(@name)
62 def merge(branch = nil, message = nil)
65 @base.merge(branch, message)
68 # merge a branch into this one
70 # merge this branch into the current one
82 @base.lib.branch_new(@name) rescue nil
86 @base.lib.branch_current == @name