File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -218,6 +218,14 @@ def blob(type = :index)
218
218
end
219
219
end
220
220
221
+ # temporarily public
222
+ def ignore_case?
223
+ return @_ignore_case if defined? ( @_ignore_case )
224
+ @_ignore_case = @base . config ( 'core.ignorecase' ) == 'true'
225
+ rescue Git ::FailedError
226
+ @_ignore_case = false
227
+ end
228
+
221
229
private
222
230
223
231
def construct_status
@@ -269,13 +277,6 @@ def fetch_added
269
277
end
270
278
end
271
279
272
- def ignore_case?
273
- return @_ignore_case if defined? ( @_ignore_case )
274
- @_ignore_case = @base . config ( 'core.ignorecase' ) == 'true'
275
- rescue Git ::FailedError
276
- @_ignore_case = false
277
- end
278
-
279
280
def downcased_files
280
281
@_downcased_files ||= @files . map { |fn , sf | [ fn . downcase , sf ] } . to_h
281
282
end
Original file line number Diff line number Diff line change @@ -119,6 +119,8 @@ def test_changed_boolean
119
119
assert ( git . status . changed? ( 'test_file_1' ) )
120
120
assert ( !git . status . changed? ( 'test_file_2' ) )
121
121
122
+ assert ( !git . status . ignore_case? )
123
+
122
124
update_file ( 'test_dot_files_status/scott/text.txt' , 'definitely different' )
123
125
assert ( git . status . changed? ( 'scott/text.txt' ) )
124
126
assert ( !git . status . changed? ( 'scott/TEXT.txt' ) )
@@ -144,6 +146,8 @@ def test_changed_boolean_ignorecase
144
146
assert ( git . status . changed? ( 'test_file_1' ) )
145
147
assert ( !git . status . changed? ( 'test_file_2' ) )
146
148
149
+ assert ( git . status . ignore_case? )
150
+
147
151
move_file ( 'test_dot_files_status/scott/text.txt' , 'test_dot_files_status/scott/TEXT.txt' )
148
152
assert ( !git . status . changed? ( 'scott/text.txt' ) )
149
153
assert ( !git . status . changed? ( 'scott/TEXT.txt' ) )
You can’t perform that action at this time.
0 commit comments