fix pushing

This commit is contained in:
Cyborus04 2023-07-23 13:26:36 -04:00
parent c1806f5aa6
commit be2f72ebc1
No known key found for this signature in database

View file

@ -119,14 +119,14 @@ async fn main() -> eyre::Result<()> {
let upstream = set_upstream.as_deref().unwrap_or("origin"); let upstream = set_upstream.as_deref().unwrap_or("origin");
let repo = git2::Repository::open(".")?; let repo = git2::Repository::open(".")?;
let remote = if set_upstream.is_some() || push { let mut remote = if set_upstream.is_some() || push {
repo.remote(upstream, new_repo.clone_url.as_str())?; repo.remote(upstream, new_repo.clone_url.as_str())?
} else { } else {
repo.find_remote(upstream)?; repo.find_remote(upstream)?
}; };
if push { if push {
remote.push(upstream)?; remote.push::<&str>(&[], None)?;
} }
} }
RepoCommand::Info => { RepoCommand::Info => {