public
Description: The Git TextMate Bundle
Homepage: http://tim.theenchanter.com/
Clone URL: git://github.com/timcharper/git-tmbundle.git
removed temp variables
timcharper (author)
Tue Apr 01 00:31:53 -0700 2008
commit  a0fa883ed18c295418723609e7a771323f75e70e
tree    4ec44c698df0361c71116b58153bd532c051d2e7
parent  cc8fd5e3db61a0864f835a09a5cfae267f3e276e
...
3
4
5
6
7
8
9
 
 
10
11
 
12
13
 
14
15
16
17
18
 
19
20
21
...
3
4
5
 
 
 
 
6
7
8
 
9
10
 
11
12
13
14
15
 
16
17
18
19
0
@@ -3,19 +3,17 @@ require LIB_ROOT + '/ui.rb'
0
 class BranchController < ApplicationController
0
   layout "application", :except => [:create, :delete]
0
   def switch
0
- locals = git.branch.list_names(:local)
0
- remotes = git.branch.list_names(:remote)
0
- current = git.branch.current_name
0
- items = ([current] + locals + remotes).compact.uniq
0
+ current_name = git.branch.current_name
0
+ items = ([current_name] + git.branch.names(:local) + git.branch.names(:remote)).compact.uniq
0
     if items.length == 0
0
- puts "Current branch is '#{current || '(no branch)'}'. There are no other branches."
0
+ puts "Current branch is '#{current_name || '(no branch)'}'. There are no other branches."
0
     else
0
- target_branch = TextMate::UI.request_item(:title => "Switch to Branch", :prompt => "Current branch is '#{current || '(no branch)'}'.\nSelect a new branch to switch to:", :items => items)
0
+ target_branch = TextMate::UI.request_item(:title => "Switch to Branch", :prompt => "Current branch is '#{current_name || '(no branch)'}'.\nSelect a new branch to switch to:", :items => items)
0
       if target_branch.blank?
0
         exit_discard
0
       end
0
       
0
- if locals.include?(target_branch)
0
+ if git.branch.names(:local).include?(target_branch)
0
         switch_local(target_branch)
0
       else
0
         switch_remote(target_branch)

Comments

    No one has commented yet.