class MGit::BranchesCommand
Public Instance Methods
arity()
click to toggle source
# File lib/mgit/commands/branches.rb, line 12 def arity [nil, 0] end
description()
click to toggle source
# File lib/mgit/commands/branches.rb, line 20 def description 'list all repository branches and tracked upstream branches' end
execute(args)
click to toggle source
# File lib/mgit/commands/branches.rb, line 3 def execute(args) Registry.each do |repo| pinfo "Repository #{repo.name} contains branches:" repo.branches.each do |b| psystem "#{b[:name]} #{b[:current] ? '*' : ''}" end end end
usage()
click to toggle source
# File lib/mgit/commands/branches.rb, line 16 def usage 'branches' end