lib/git-up.rb in git-up-0.4.2 vs lib/git-up.rb in git-up-0.4.3

- old
+ new

@@ -1,11 +1,11 @@ require 'colored' require 'grit' class GitUp def run - system "git", "fetch", "--all" + system('git', 'fetch', '--multiple', *remotes) raise GitError, "`git fetch` failed" unless $? == 0 with_stash do returning_to_current_branch do col_width = branches.map { |b| b.name.length }.max + 1 @@ -59,9 +59,13 @@ end end def branches @branches ||= repo.branches.select { |b| remote_map.has_key?(b.name) } + end + + def remotes + @remotes ||= remote_map.values.map { |r| r.name.split('/', 2).first }.uniq end def remote_map @remote_map ||= repo.branches.inject({}) { |map, branch| if remote = remote_for_branch(branch)