From be2f72ebc1b811a0b15cb6fe884d6adcd46122bf Mon Sep 17 00:00:00 2001 From: Cyborus04 <87248184+Cyborus04@users.noreply.github.com> Date: Sun, 23 Jul 2023 13:26:36 -0400 Subject: [PATCH] fix pushing --- src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 24dca9c..3ab1338 100644 --- a/src/main.rs +++ b/src/main.rs @@ -119,14 +119,14 @@ async fn main() -> eyre::Result<()> { let upstream = set_upstream.as_deref().unwrap_or("origin"); let repo = git2::Repository::open(".")?; - let remote = if set_upstream.is_some() || push { - repo.remote(upstream, new_repo.clone_url.as_str())?; + let mut remote = if set_upstream.is_some() || push { + repo.remote(upstream, new_repo.clone_url.as_str())? } else { - repo.find_remote(upstream)?; + repo.find_remote(upstream)? }; if push { - remote.push(upstream)?; + remote.push::<&str>(&[], None)?; } } RepoCommand::Info => {