@@ -182,7 +182,7 @@ static void rugged_repo_new_with_backend(git_repository **repo, VALUE rb_path, V
182
182
183
183
int error = 0 ;
184
184
185
- Check_Type (rb_path , T_STRING );
185
+ FilePathValue (rb_path );
186
186
path = StringValueCStr (rb_path );
187
187
188
188
if (rb_obj_is_kind_of (rb_backend , rb_cRuggedBackend ) == Qfalse ) {
@@ -291,7 +291,7 @@ static VALUE rb_git_repo_open_bare(int argc, VALUE *argv, VALUE klass)
291
291
}
292
292
293
293
if (!repo ) {
294
- Check_Type (rb_path , T_STRING );
294
+ FilePathValue (rb_path );
295
295
296
296
error = git_repository_open_bare (& repo , StringValueCStr (rb_path ));
297
297
rugged_exception_check (error );
@@ -335,7 +335,7 @@ static VALUE rb_git_repo_new(int argc, VALUE *argv, VALUE klass)
335
335
VALUE rb_path , rb_options ;
336
336
337
337
rb_scan_args (argc , argv , "10:" , & rb_path , & rb_options );
338
- Check_Type (rb_path , T_STRING );
338
+ FilePathValue (rb_path );
339
339
340
340
error = git_repository_open (& repo , StringValueCStr (rb_path ));
341
341
rugged_exception_check (error );
@@ -377,7 +377,7 @@ static VALUE rb_git_repo_init_at(int argc, VALUE *argv, VALUE klass)
377
377
int error ;
378
378
379
379
rb_scan_args (argc , argv , "11:" , & rb_path , & rb_is_bare , & rb_options );
380
- Check_Type (rb_path , T_STRING );
380
+ FilePathValue (rb_path );
381
381
382
382
if (!NIL_P (rb_options )) {
383
383
/* Check for `:backend` */
@@ -474,7 +474,7 @@ static VALUE rb_git_repo_clone_at(int argc, VALUE *argv, VALUE klass)
474
474
475
475
rb_scan_args (argc , argv , "21" , & url , & local_path , & rb_options_hash );
476
476
Check_Type (url , T_STRING );
477
- Check_Type (local_path , T_STRING );
477
+ FilePathValue (local_path );
478
478
479
479
parse_clone_options (& options , rb_options_hash , & remote_payload );
480
480
@@ -1180,7 +1180,7 @@ static VALUE rb_git_repo_hashfile(VALUE self, VALUE rb_path, VALUE rb_type)
1180
1180
int error ;
1181
1181
git_oid oid ;
1182
1182
1183
- Check_Type (rb_path , T_STRING );
1183
+ FilePathValue (rb_path );
1184
1184
1185
1185
error = git_odb_hashfile (& oid ,
1186
1186
StringValueCStr (rb_path ),
@@ -1455,7 +1455,7 @@ static VALUE rb_git_repo_discover(int argc, VALUE *argv, VALUE klass)
1455
1455
across_fs = rugged_parse_bool (rb_across_fs );
1456
1456
}
1457
1457
1458
- Check_Type (rb_path , T_STRING );
1458
+ FilePathValue (rb_path );
1459
1459
1460
1460
error = git_repository_discover (
1461
1461
& repository_path ,
@@ -1518,7 +1518,7 @@ static VALUE rb_git_repo_file_status(VALUE self, VALUE rb_path)
1518
1518
git_repository * repo ;
1519
1519
1520
1520
Data_Get_Struct (self , git_repository , repo );
1521
- Check_Type (rb_path , T_STRING );
1521
+ FilePathValue (rb_path );
1522
1522
error = git_status_file (& flags , repo , StringValueCStr (rb_path ));
1523
1523
rugged_exception_check (error );
1524
1524
@@ -2365,7 +2365,7 @@ static VALUE rb_git_repo_attributes(int argc, VALUE *argv, VALUE self)
2365
2365
rb_scan_args (argc , argv , "12" , & rb_path , & rb_names , & rb_options );
2366
2366
2367
2367
Data_Get_Struct (self , git_repository , repo );
2368
- Check_Type (rb_path , T_STRING );
2368
+ FilePathValue (rb_path );
2369
2369
2370
2370
if (!NIL_P (rb_options )) {
2371
2371
Check_Type (rb_options , T_FIXNUM );
0 commit comments