Permalink
Browse files

Fix branch sorting in Ruby 1.8

  • Loading branch information...
1 parent 5579a09 commit d67001de46239b9551c12753e4dbb88590c079c3 @aanand committed Sep 20, 2012
Showing with 1 addition and 6 deletions.
  1. +1 −6 lib/git-up.rb
View
@@ -29,11 +29,6 @@ def run
def rebase_all_branches
col_width = branches.map { |b| b.name.length }.max + 1
- branches.sort_by! do |b|
- # perhaps add some way to customize sorting?
- b.name
- end
-
branches.each do |branch|
remote = remote_map[branch.name]
@@ -82,7 +77,7 @@ def get_repo
end
def branches
- @branches ||= repo.branches.select { |b| remote_map.has_key?(b.name) }
+ @branches ||= repo.branches.select { |b| remote_map.has_key?(b.name) }.sort_by { |b| b.name }
end
def remotes

0 comments on commit d67001d

Please sign in to comment.