git-up 0.4.2 → 0.4.3

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.
Files changed (3) hide show
  1. data/lib/git-up.rb +5 -1
  2. data/lib/git-up/version.rb +1 -1
  3. metadata +3 -3
@@ -3,7 +3,7 @@ require 'grit'
3
3
 
4
4
  class GitUp
5
5
  def run
6
- system "git", "fetch", "--all"
6
+ system('git', 'fetch', '--multiple', *remotes)
7
7
  raise GitError, "`git fetch` failed" unless $? == 0
8
8
 
9
9
  with_stash do
@@ -63,6 +63,10 @@ class GitUp
63
63
  @branches ||= repo.branches.select { |b| remote_map.has_key?(b.name) }
64
64
  end
65
65
 
66
+ def remotes
67
+ @remotes ||= remote_map.values.map { |r| r.name.split('/', 2).first }.uniq
68
+ end
69
+
66
70
  def remote_map
67
71
  @remote_map ||= repo.branches.inject({}) { |map, branch|
68
72
  if remote = remote_for_branch(branch)
@@ -1,3 +1,3 @@
1
1
  class GitUp
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 2
9
- version: 0.4.2
8
+ - 3
9
+ version: 0.4.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Aanand Prasad
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-27 00:00:00 +00:00
18
+ date: 2011-01-28 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency