mgit 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Y2QzMjEzYWZkYmUyZTU2NzIzNjg1MzliYjc1MTRlZjRiNmUyYTQ4MQ==
4
+ Zjg4MjgyNDhlYzIyYjM3ZDU5OTk3ZTA2ZDQ5YzcxZDBjMTk2YjBkMQ==
5
5
  data.tar.gz: !binary |-
6
- Y2Y5YTRhNjgzYmM0NmZlYTYyNWNkMTUyYWI5MjkwZTJhZjZjMzhiZQ==
6
+ NThkN2I2YzJmOTI3OGJkMDE3YzM0ZWY5MDYzMDNlZmM5ZmFjOGQ5ZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MWVlZjAyZjQ3YjQ2MjdkMmE2ZmJmMmJkMGI0MWNkYzM1Y2RjMGVlZmIyNTIw
10
- MTJiYjcxYTg1YjgzZjE1MzUyYTk3MzIxOWUyZjQ1NzczNWVkMGFhZTkxNGIz
11
- YTU1YzBmMWRiZjRjOWQ2ZTBjNGFmZGRiNWJhMjU0YmUwYTExMGE=
9
+ YTNiMGM4YzkzMTU1MzYwZWI1OGRkM2RkMGY4NTExOWRiNzc4NmRiNDlmMzVi
10
+ MTJjZjI2NDJiYTBkZWRmMDc0NDkzOTQwNzlkZDU2YmFiYWRlMWRhNDQ5ZmQy
11
+ ZTgwNzEwZjQwYmRmYWNkNjc4OGEyNTZhYWMzM2UxYTkzNjU1MzM=
12
12
  data.tar.gz: !binary |-
13
- MWQ5YTZhMDVhZjNhMmViZmU1N2FkYjAwNTJiZjgzNDQ2YmNhMDBhMzI2ZWJk
14
- MjZhNTY0YTg5MDdhNjMyZDI1ODkwYjk0NGMzYzZkOTFkODZjY2VjYzYwMjEx
15
- YmU4NTk0NDNiZjJhOTI4MjMwMThjODQ0ZDllODdlZGVmNDQ3ODM=
13
+ YzMyY2UyM2FlN2NhNTNhYjgyNjc1YWVhMzkzYmY3MTZjZjI5YWQ0ZDg4NDU1
14
+ MjJiMWM4MGQzYzUyMWZiZmFlZGUxYjJlMTk1NmU1OTM4MmQ2ZTg0ZTljZmEz
15
+ ZjIzNmI3MjczODczYmU5ZGZjOTM0OWExMTJhYzdiODdmMGYzZDU=
@@ -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
@@ -1,3 +1,3 @@
1
1
  module MGit
2
- VERSION = '0.2.4'
2
+ VERSION = '0.2.5'
3
3
  end
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
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-12 00:00:00.000000000 Z
11
+ date: 2013-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize