mgit 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/mgit/commands/ffmerge.rb +1 -1
- data/lib/mgit/commands/status.rb +1 -0
- data/lib/mgit/repository.rb +9 -2
- data/lib/mgit/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Nzc1OTY5YThjMGNhNWI3NGQyYjEwYzA4NGVlMDM1YjIyZTlhMWZiNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjcyZjUwMjRlOWUzMDQ1YmU5YmJhMDU0ODVlZmRhYzZiYzUyMTJkNQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YmNjMzk1ZjI5Yjc1NTRhZDkxZGVkZGIzNmU5MTIxZDYzYjNkYzBiZDQzYjkx
|
10
|
+
YjUxYTI1MjBjMGViNjc5YTA1ZDcxMTVjN2M3YjEwOTkzZjlmNmRlOTBmYTdl
|
11
|
+
YzVhNGJhNDEzYzkzZWY2MGRhYTY2YTBkZDM1NGFmZThlMWYzNGQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjNjYzkxNDY3NzQ3ZWNiMGU5ZDE3NjJjYzM1ZjUzMDFmOTU2ZDUxYjFmMjcx
|
14
|
+
ZjA1N2QxMTRiMTQzZTdjMDg3MDZmZGIwYjliNDc2MGU5ZTYzNTMwZGFhZGM4
|
15
|
+
MWY5NTI5MTYyYTQ4NzUzYWQ4OGYyOGUyMDhjZGY5NGQ5Nzg3OTQ=
|
data/lib/mgit/commands/status.rb
CHANGED
@@ -32,6 +32,7 @@ module MGit
|
|
32
32
|
flags << 'Index'.red if fs.include?(:index)
|
33
33
|
flags << 'Dirty'.red if fs.include?(:dirty)
|
34
34
|
flags << 'Untracked'.yellow if fs.include?(:untracked)
|
35
|
+
flags << 'Detached'.yellow if fs.include?(:detached)
|
35
36
|
|
36
37
|
if fs.include?(:diverged)
|
37
38
|
ds = repo.divergence
|
data/lib/mgit/repository.rb
CHANGED
@@ -24,7 +24,11 @@ module MGit
|
|
24
24
|
when '??'
|
25
25
|
flags << :untracked
|
26
26
|
when '##'
|
27
|
-
|
27
|
+
if /## ([\w,\/]+)\.\.\.([\w,\/]+) \[(\w+) (\d+)\]/ =~ s
|
28
|
+
flags << :diverged
|
29
|
+
elsif /## HEAD \(no branch\)/ =~ s
|
30
|
+
flags << :detached
|
31
|
+
end
|
28
32
|
end
|
29
33
|
end
|
30
34
|
flags
|
@@ -48,9 +52,12 @@ module MGit
|
|
48
52
|
|
49
53
|
private
|
50
54
|
|
55
|
+
def status
|
56
|
+
@status ||= `git status --short --branch --ignore-submodules`.split("\n")
|
57
|
+
end
|
58
|
+
|
51
59
|
def status_lines
|
52
60
|
Dir.chdir(path) do
|
53
|
-
status = `git status --short --branch --ignore-submodules`.split("\n")
|
54
61
|
status.each do |s|
|
55
62
|
yield s
|
56
63
|
end
|
data/lib/mgit/version.rb
CHANGED