File tree 3 files changed +37
-1
lines changed 3 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -747,7 +747,7 @@ def log_path_options(opts)
747
747
arr_opts = [ ]
748
748
749
749
arr_opts << opts [ :object ] if opts [ :object ] . is_a? String
750
- arr_opts << '--' << opts [ :path_limiter ] if opts [ :path_limiter ] . is_a? String
750
+ arr_opts << '--' << opts [ :path_limiter ] if opts [ :path_limiter ]
751
751
752
752
arr_opts
753
753
end
Original file line number Diff line number Diff line change @@ -63,6 +63,15 @@ def test_get_log_since_file
63
63
l = @git . log . between ( 'v2.5' , 'test' ) . path ( 'example.txt' )
64
64
assert_equal ( 1 , l . size )
65
65
end
66
+
67
+ def test_get_log_path
68
+ log = @git . log . path ( 'example.txt' )
69
+ assert_equal ( 30 , log . size )
70
+ log = @git . log . path ( 'example*' )
71
+ assert_equal ( 30 , log . size )
72
+ log = @git . log . path ( [ 'example.txt' , 'scott/text.txt' ] )
73
+ assert_equal ( 30 , log . size )
74
+ end
66
75
67
76
def test_log_file_noexist
68
77
assert_raise Git ::GitExecuteError do
Original file line number Diff line number Diff line change
1
+
2
+ #!/usr/bin/env ruby
3
+
4
+ require File . dirname ( __FILE__ ) + '/../test_helper'
5
+
6
+ class TestStatus < Test ::Unit ::TestCase
7
+
8
+ def setup
9
+ set_file_paths
10
+ end
11
+
12
+ def test_dot_files_status
13
+ in_temp_dir do |path |
14
+ git = Git . clone ( @wdir , 'test_dot_files_status' )
15
+
16
+ create_file ( 'test_dot_files_status/test_file_1' , 'content tets_file_1' )
17
+ create_file ( 'test_dot_files_status/.test_file_2' , 'content test_file_2' )
18
+
19
+ git . add ( 'test_file_1' )
20
+ git . add ( '.test_file_2' )
21
+
22
+ assert ( git . status . added . assoc ( 'test_file_1' ) )
23
+ assert ( git . status . added . assoc ( '.test_file_2' ) )
24
+ end
25
+ end
26
+
27
+ end
You can’t perform that action at this time.
0 commit comments