mgit 0.2.4 → 0.2.5
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/repository.rb +12 -3
- data/lib/mgit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Zjg4MjgyNDhlYzIyYjM3ZDU5OTk3ZTA2ZDQ5YzcxZDBjMTk2YjBkMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NThkN2I2YzJmOTI3OGJkMDE3YzM0ZWY5MDYzMDNlZmM5ZmFjOGQ5ZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTNiMGM4YzkzMTU1MzYwZWI1OGRkM2RkMGY4NTExOWRiNzc4NmRiNDlmMzVi
|
10
|
+
MTJjZjI2NDJiYTBkZWRmMDc0NDkzOTQwNzlkZDU2YmFiYWRlMWRhNDQ5ZmQy
|
11
|
+
ZTgwNzEwZjQwYmRmYWNkNjc4OGEyNTZhYWMzM2UxYTkzNjU1MzM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzMyY2UyM2FlN2NhNTNhYjgyNjc1YWVhMzkzYmY3MTZjZjI5YWQ0ZDg4NDU1
|
14
|
+
MjJiMWM4MGQzYzUyMWZiZmFlZGUxYjJlMTk1NmU1OTM4MmQ2ZTg0ZTljZmEz
|
15
|
+
ZjIzNmI3MjczODczYmU5ZGZjOTM0OWExMTJhYzdiODdmMGYzZDU=
|
data/lib/mgit/repository.rb
CHANGED
@@ -16,17 +16,26 @@ module MGit
|
|
16
16
|
}
|
17
17
|
end
|
18
18
|
|
19
|
-
def remote_tracking_branches
|
19
|
+
def remote_tracking_branches(upstream_exists_only = true)
|
20
|
+
rb = remote_branches
|
21
|
+
|
20
22
|
a = in_repo do
|
21
23
|
`git for-each-ref --format='%(refname:short) %(upstream:short)' refs/heads`.
|
22
24
|
split("\n").
|
23
25
|
map { |b| b.split(' ') }.
|
24
|
-
reject { |b| b.size != 2 }
|
26
|
+
reject { |b| b.size != 2 }.
|
27
|
+
select { |b| !upstream_exists_only || rb.include?(b[1]) }
|
25
28
|
end
|
26
29
|
|
27
30
|
Hash[a]
|
28
31
|
end
|
29
32
|
|
33
|
+
def remote_branches
|
34
|
+
in_repo do
|
35
|
+
`git branch -r`.split("\n").map { |a| a.split(' ')[0] }
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
30
39
|
def flags
|
31
40
|
flags = Set.new
|
32
41
|
status_lines do |s|
|
@@ -69,7 +78,7 @@ module MGit
|
|
69
78
|
end
|
70
79
|
|
71
80
|
private
|
72
|
-
|
81
|
+
|
73
82
|
def in_repo
|
74
83
|
Dir.chdir(path) { yield }
|
75
84
|
end
|
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.2.
|
4
|
+
version: 0.2.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: 2013-11-
|
11
|
+
date: 2013-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|