Skip to content

Commit ab1e207

Browse files
committed
fix: remove deprecation from Git::Path
This class is internal only as well as the classes that inherit from it (Git::Index and Git::WorkingTree). Remove the deprecation warning and just remove the deprecated code.
1 parent feab258 commit ab1e207

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

lib/git/path.rb

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,7 @@ module Git
99
class Path
1010
attr_accessor :path
1111

12-
def initialize(path, check_path = nil, must_exist: nil)
13-
unless check_path.nil?
14-
Git::Deprecation.warn(
15-
'The "check_path" argument is deprecated and ' \
16-
'will be removed in a future version. Use "must_exist:" instead.'
17-
)
18-
end
19-
20-
# default is true
21-
must_exist = must_exist.nil? && check_path.nil? ? true : must_exist || check_path
22-
12+
def initialize(path, must_exist: true)
2313
path = File.expand_path(path)
2414

2515
raise ArgumentError, 'path does not exist', [path] if must_exist && !File.exist?(path)

0 commit comments

Comments
 (0)