class MGit::LogCommand
Public Instance Methods
arity()
click to toggle source
# File lib/mgit/commands/log.rb, line 18 def arity [nil, 0] end
description()
click to toggle source
# File lib/mgit/commands/log.rb, line 26 def description 'show unmerged commits for all remote-tracking branches' end
execute(_)
click to toggle source
# File lib/mgit/commands/log.rb, line 3 def execute(_) 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()
click to toggle source
# File lib/mgit/commands/log.rb, line 22 def usage 'log' end