lib/git-up.rb in git-up-0.5.7 vs lib/git-up.rb in git-up-0.5.8

- old
+ new

@@ -27,15 +27,10 @@ end 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] print branch.name.ljust(col_width) @@ -51,10 +46,13 @@ next end if base == branch.commit.sha puts "fast-forwarding...".yellow + elsif config("rebase.auto") == 'false' + puts "diverged".red + next else puts "rebasing...".yellow end log(branch, remote) @@ -77,10 +75,10 @@ raise GitError, "We don't seem to be in a git repository." end 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 @remotes ||= remote_map.values.map { |r| r.name.split('/', 2).first }.uniq end