summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCyborus04 <87248184+Cyborus04@users.noreply.github.com>2023-07-23 19:26:36 +0200
committerCyborus04 <87248184+Cyborus04@users.noreply.github.com>2023-07-23 19:26:36 +0200
commitbe2f72ebc1b811a0b15cb6fe884d6adcd46122bf (patch)
treee724a2eb073310a666269efbadf7f32b25812496 /src
parentReplace calls to git with `git2` crate (#5) (diff)
downloadforgejo-cli-be2f72ebc1b811a0b15cb6fe884d6adcd46122bf.tar.xz
forgejo-cli-be2f72ebc1b811a0b15cb6fe884d6adcd46122bf.zip
fix pushing
Diffstat (limited to 'src')
-rw-r--r--src/main.rs8
1 files 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 => {