Skip to content

Commit 6e973d8

Browse files
Remove unused variables.
1 parent e516e9c commit 6e973d8

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

ext/rugged/rugged_remote.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,6 @@ static VALUE rb_git_remote_check_connection(int argc, VALUE *argv, VALUE self)
514514
static VALUE rb_git_remote_fetch(int argc, VALUE *argv, VALUE self)
515515
{
516516
git_remote *remote;
517-
git_repository *repo;
518517
git_strarray refspecs;
519518
git_fetch_options opts = GIT_FETCH_OPTIONS_INIT;
520519
const git_transfer_progress *stats;
@@ -523,15 +522,13 @@ static VALUE rb_git_remote_fetch(int argc, VALUE *argv, VALUE self)
523522
char *log_message = NULL;
524523
int error;
525524

526-
VALUE rb_options, rb_refspecs, rb_result = Qnil, rb_repo = rugged_owner(self);
525+
VALUE rb_options, rb_refspecs, rb_result = Qnil;
527526

528527
rb_scan_args(argc, argv, "01:", &rb_refspecs, &rb_options);
529528

530529
rugged_rb_ary_to_strarray(rb_refspecs, &refspecs);
531530

532531
Data_Get_Struct(self, git_remote, remote);
533-
rugged_check_repo(rb_repo);
534-
Data_Get_Struct(rb_repo, git_repository, repo);
535532

536533
rugged_remote_init_callbacks_and_payload_from_options(rb_options, &opts.callbacks, &payload);
537534

@@ -594,9 +591,7 @@ static VALUE rb_git_remote_fetch(int argc, VALUE *argv, VALUE self)
594591
static VALUE rb_git_remote_push(int argc, VALUE *argv, VALUE self)
595592
{
596593
VALUE rb_refspecs, rb_options;
597-
VALUE rb_repo = rugged_owner(self);
598594

599-
git_repository *repo;
600595
git_remote *remote;
601596
git_strarray refspecs;
602597
git_push_options opts = GIT_PUSH_OPTIONS_INIT;
@@ -609,8 +604,6 @@ static VALUE rb_git_remote_push(int argc, VALUE *argv, VALUE self)
609604

610605
rugged_rb_ary_to_strarray(rb_refspecs, &refspecs);
611606

612-
rugged_check_repo(rb_repo);
613-
Data_Get_Struct(rb_repo, git_repository, repo);
614607
Data_Get_Struct(self, git_remote, remote);
615608

616609
rugged_remote_init_callbacks_and_payload_from_options(rb_options, &opts.callbacks, &payload);

0 commit comments

Comments
 (0)