Permalink
Browse files

Sort the remotes given with `github info`

origin is listed first, all other remotes listed alphabetically
  • Loading branch information...
1 parent 33354f2 commit 83ee1d71c024988f510a5be7b0ce397c1524e2d2 @kballard kballard committed Jul 1, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 commands/commands.rb
View
@@ -33,7 +33,7 @@
puts "== Info for #{helper.project}"
puts "You are #{helper.owner}"
puts "Currently tracking:"
- helper.tracking.each do |(name,user_or_url)|
+ helper.tracking.sort { |(a,),(b,)| a == :origin ? -1 : b == :origin ? 1 : a.to_s <=> b.to_s }.each do |(name,user_or_url)|
puts " - #{user_or_url} (as #{name})"
end
end

0 comments on commit 83ee1d7

Please sign in to comment.