We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e26f69 commit 7889faaCopy full SHA for 7889faa
lib/git/status_all.rb
@@ -39,7 +39,7 @@ def main
39
r = remote_status(g)
40
s = " #{s} ".black.on_yellow unless s.empty?
41
n = s.empty? ? name : name.yellow
42
- puts "#{n}".pad_to_col(24).append(s).right_align("#{r} [#{g.branch.to_s.blue}]")
+ puts "#{n}".pad_to_col(24).append(s).right_align("#{r} [#{g.branches.current.to_s.blue}]")
43
end
44
45
lib/git/status_all/git.rb
@@ -8,7 +8,17 @@ def self.repo? path
8
9
10
11
+ class Branches
12
+ def current
13
+ select{ |b| b.current? }.first
14
+ end
15
16
+
17
class Branch
18
+ def current?
19
+ current
20
21
22
def up_to_date?
23
ahead_count == 0 && behind_count == 0
24
0 commit comments