Class: MGit::FFMergeCommand
Instance Method Summary
collapse
Methods inherited from Command
#check_arity, create, execute, instance_each, list, load_commands, register_alias, register_command, require_commands_from_directory
Methods included from Output
#perror, #pinfo, #psystem, #ptable, #pwarn
Instance Method Details
#arity ⇒ Object
17
18
19
|
# File 'lib/mgit/commands/ffmerge.rb', line 17
def arity
[nil, 0]
end
|
#description ⇒ Object
25
26
27
|
# File 'lib/mgit/commands/ffmerge.rb', line 25
def description
'merge all upstream tracking branches that can be fast-forwarded'
end
|
#execute(_) ⇒ Object
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# File 'lib/mgit/commands/ffmerge.rb', line 3
def execute(_)
Registry.chdir_each do |repo|
branches = mergable_branches(repo)
next if branches.empty?
if repo.dirty?
pwarn "Skipping repository #{repo.name} since it's dirty."
next
end
merge_branches(repo, branches)
end
end
|
#usage ⇒ Object
21
22
23
|
# File 'lib/mgit/commands/ffmerge.rb', line 21
def usage
'ffmerge'
end
|