mgit 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mgit/commands/status.rb +3 -1
- data/lib/mgit/repository.rb +4 -2
- data/lib/mgit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06e1ae3652e0ef938b2ab3718e16138819fa7cef
|
4
|
+
data.tar.gz: 0de46a8745d26340c709fa541cd285b4495bf2e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad59a05c35345e75306e78a086a2ae2543236ae58c3b88e2286c846ba636b7824cc15d6a3a321553ec1d1170d06899b80fc618cd62f64f31f9d42ff5c3b228ed
|
7
|
+
data.tar.gz: 4e1286094835753887f271eaed10589875dd391b064b4362adf6dc7724e41e5840a2f4485de0f9f6e871654ca8acbb059b666d9870b2bf2c0cdc4ed454f0c8a8
|
data/lib/mgit/commands/status.rb
CHANGED
@@ -41,7 +41,9 @@ module MGit
|
|
41
41
|
|
42
42
|
def decorate_divergence_flags(divergence)
|
43
43
|
divergence.map do |d|
|
44
|
-
|
44
|
+
d.map do |k, v|
|
45
|
+
"#{k.to_s.capitalize} of #{v[:branch]} by #{v[:by]}".blue
|
46
|
+
end
|
45
47
|
end
|
46
48
|
end
|
47
49
|
end
|
data/lib/mgit/repository.rb
CHANGED
@@ -79,7 +79,7 @@ module MGit
|
|
79
79
|
when '??'
|
80
80
|
flags << :untracked
|
81
81
|
when '##'
|
82
|
-
if /##
|
82
|
+
if /## [\w,\/]+\.\.\.[\w,\/]+ \[.+\]/ =~ s
|
83
83
|
flags << :diverged
|
84
84
|
elsif /## HEAD \(no branch\)/ =~ s
|
85
85
|
flags << :detached
|
@@ -93,7 +93,9 @@ module MGit
|
|
93
93
|
divergence = []
|
94
94
|
status_lines do |s|
|
95
95
|
if s.split[0] == '##'
|
96
|
-
if(m = /## ([\w,\/]+)\.\.\.([\w,\/]+) \[(\
|
96
|
+
if(m = /## ([\w,\/]+)\.\.\.([\w,\/]+) \[ahead (\d+), behind (\d+)\]/.match(s))
|
97
|
+
divergence << { :ahead => { :branch => m[2], :by => m[3] }, :behind => { :branch => m[2], :by => m[4] } }
|
98
|
+
elsif(m = /## ([\w,\/]+)\.\.\.([\w,\/]+) \[(\w+) (\d+)\]/.match(s))
|
97
99
|
if m[3] =~ /behind/
|
98
100
|
divergence << { :behind => { :branch => m[2], :by => m[4] } }
|
99
101
|
else
|
data/lib/mgit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mgit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- FlavourSys Technology GmbH
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|