@@ -514,7 +514,6 @@ static VALUE rb_git_remote_check_connection(int argc, VALUE *argv, VALUE self)
514
514
static VALUE rb_git_remote_fetch (int argc , VALUE * argv , VALUE self )
515
515
{
516
516
git_remote * remote ;
517
- git_repository * repo ;
518
517
git_strarray refspecs ;
519
518
git_fetch_options opts = GIT_FETCH_OPTIONS_INIT ;
520
519
const git_transfer_progress * stats ;
@@ -523,15 +522,13 @@ static VALUE rb_git_remote_fetch(int argc, VALUE *argv, VALUE self)
523
522
char * log_message = NULL ;
524
523
int error ;
525
524
526
- VALUE rb_options , rb_refspecs , rb_result = Qnil , rb_repo = rugged_owner ( self ) ;
525
+ VALUE rb_options , rb_refspecs , rb_result = Qnil ;
527
526
528
527
rb_scan_args (argc , argv , "01:" , & rb_refspecs , & rb_options );
529
528
530
529
rugged_rb_ary_to_strarray (rb_refspecs , & refspecs );
531
530
532
531
Data_Get_Struct (self , git_remote , remote );
533
- rugged_check_repo (rb_repo );
534
- Data_Get_Struct (rb_repo , git_repository , repo );
535
532
536
533
rugged_remote_init_callbacks_and_payload_from_options (rb_options , & opts .callbacks , & payload );
537
534
@@ -594,9 +591,7 @@ static VALUE rb_git_remote_fetch(int argc, VALUE *argv, VALUE self)
594
591
static VALUE rb_git_remote_push (int argc , VALUE * argv , VALUE self )
595
592
{
596
593
VALUE rb_refspecs , rb_options ;
597
- VALUE rb_repo = rugged_owner (self );
598
594
599
- git_repository * repo ;
600
595
git_remote * remote ;
601
596
git_strarray refspecs ;
602
597
git_push_options opts = GIT_PUSH_OPTIONS_INIT ;
@@ -609,8 +604,6 @@ static VALUE rb_git_remote_push(int argc, VALUE *argv, VALUE self)
609
604
610
605
rugged_rb_ary_to_strarray (rb_refspecs , & refspecs );
611
606
612
- rugged_check_repo (rb_repo );
613
- Data_Get_Struct (rb_repo , git_repository , repo );
614
607
Data_Get_Struct (self , git_remote , remote );
615
608
616
609
rugged_remote_init_callbacks_and_payload_from_options (rb_options , & opts .callbacks , & payload );
0 commit comments