9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/abak-flow/commands/compare.rb', line 9
def run(args, options)
Checkup.new.process(Array.new, ::Commander::Command::Options.new)
current = Manager.git.current_branch
head = Branch.new(options.head || current)
base = Branch.new(options.base || head.)
if head.current?
say white {
Manager.locale.word(self, 'updating',
branch: bold { head },
upstream: bold { "#{Manager.repository.origin}" })
}
head.update
else
say yellow {
Manager.locale.word(self, 'diverging', branch: bold { head })
}
end
say green { head.compare_link(base) }
end
|