File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -277,6 +277,11 @@ def checkout(branch = 'master', opts = {})
277
277
self . lib . checkout ( branch , opts )
278
278
end
279
279
280
+ # checks out an old version of a file
281
+ def checkout_file ( version , file )
282
+ self . lib . checkout_file ( version , file )
283
+ end
284
+
280
285
# fetches changes from a remote branch - this does not modify the working directory,
281
286
# it just gets the changes from the remote if there are any
282
287
def fetch ( remote = 'origin' )
Original file line number Diff line number Diff line change @@ -434,6 +434,13 @@ def checkout(branch, opts = {})
434
434
435
435
command ( 'checkout' , arr_opts )
436
436
end
437
+
438
+ def checkout_file ( version , file )
439
+ arr_opts = [ ]
440
+ arr_opts << version . to_s
441
+ arr_opts << file . to_s
442
+ command ( 'checkout' , arr_opts )
443
+ end
437
444
438
445
def merge ( branch , message = nil )
439
446
arr_opts = [ ]
You can’t perform that action at this time.
0 commit comments