public
Description: The Git TextMate Bundle
Homepage: http://tim.theenchanter.com/
Clone URL: git://github.com/timcharper/git-tmbundle.git
Changed apply stash to pop stash
timcharper (author)
Thu Jun 05 15:10:36 -0700 2008
commit  a7b826e223e2520833eb25e5eea59df734aec6af
tree    f08751dbc0620a87fc6a069c0df9ab0ac0f40551
parent  a43a0c971e67667fbbb034a0e88f844fbeca1ec1
...
18
19
20
21
22
 
 
23
24
25
26
27
 
28
29
 
 
 
30
31
 
32
33
34
...
56
57
58
59
 
60
61
62
...
18
19
20
 
 
21
22
23
24
25
26
 
27
28
 
29
30
31
32
 
33
34
35
36
...
58
59
60
 
61
62
63
64
0
@@ -18,17 +18,19 @@ class StashController < ApplicationController
0
     render("diff/_diff_results", :locals => {:diff_results => (git.stash.diff(stash_item[:name]))})
0
   end
0
   
0
- def apply
0
- stash_item = select_stash(:prompt => "Select a stash to apply")
0
+ def pop
0
+ stash_item = select_stash(:prompt => "Select a stash to pop")
0
     if stash_item.nil?
0
       puts "Cancelled"
0
       return
0
     end
0
- puts "<h2>Applying stash '#{stash_item[:description]}'</h2>"
0
+ puts "<h2>Popping stash '#{stash_item[:description]}'</h2>"
0
     flush
0
-
0
+
0
+ stash_diff = git.stash.diff(stash_item[:name])
0
+
0
     stash_it = lambda {
0
- git.stash.apply(stash_item[:name])
0
+ git.stash.pop(stash_item[:name])
0
     }
0
 
0
     result = stash_it.call
0
@@ -56,7 +58,7 @@ class StashController < ApplicationController
0
     render "status/_status", :locals => {:status_data => status_data}
0
     
0
     puts "<h2>Diff of stash applied:</h2>"
0
- render("/diff/_diff_results", :locals => {:diff_results => git.stash.diff(stash_item[:name])})
0
+ render("/diff/_diff_results", :locals => {:diff_results => stash_diff})
0
     
0
     rescan_project
0
   end
...
25
26
27
 
 
 
 
28
29
30
...
25
26
27
28
29
30
31
32
33
34
0
@@ -25,6 +25,10 @@ class SCM::Git::Stash < SCM::Git::CommandProxyBase
0
     base.command("stash", "apply", "--index", name)
0
   end
0
   
0
+ def pop(name)
0
+ base.command("stash", "pop", "--index", name)
0
+ end
0
+
0
   def clear
0
     base.command("stash", "clear")
0
   end
...
162
163
164
165
166
 
 
167
168
169
...
162
163
164
 
 
165
166
167
168
169
0
@@ -162,8 +162,8 @@ module SCM
0
       options[:type] ||= nil
0
       params = []
0
       params << "-#{options[:type]}" if options[:type]
0
- params << "--exclude-per-directory=.gitignore"
0
- params << "--exclude-from=#{e_sh options[:exclude_file]}" if options[:exclude_file]
0
+ # params << "--exclude-per-directory=.gitignore"
0
+ # params << "--exclude-from=#{e_sh options[:exclude_file]}" if options[:exclude_file]
0
       
0
       command("ls-files", *params).split("\n")
0
     end

Comments

    No one has commented yet.