Class: MGit::LogCommand
Instance Method Summary
collapse
Methods inherited from Command
#check_arity, execute, instance_each, list, load_commands, register_alias, register_command
Methods included from Output
#perror, #pinfo, #ptable, #pwarn
Instance Method Details
#arity ⇒ Object
18
19
20
|
# File 'lib/mgit/commands/log.rb', line 18
def arity
[nil, 0]
end
|
#description ⇒ Object
26
27
28
|
# File 'lib/mgit/commands/log.rb', line 26
def description
'show unmerged commits for all remote-tracking branches'
end
|
#execute(args) ⇒ Object
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/mgit/commands/log.rb', line 3
def execute(args)
Registry.chdir_each do |repo|
repo.remote_tracking_branches.each do |branch, upstream|
uc = repo.unmerged_commits(branch, upstream)
next if uc.empty?
pinfo "In repository #{repo.name}, branch #{upstream} the following commits were made:"
t = []
uc.each { |c| t << [c[:commit], c[:author], c[:subject]] }
ptable t
end
end
end
|
#usage ⇒ Object
22
23
24
|
# File 'lib/mgit/commands/log.rb', line 22
def usage
'log'
end
|