mirror of
https://codeberg.org/Cyborus/forgejo-cli.git
synced 2024-11-10 12:09:33 +01:00
fix pushing
This commit is contained in:
parent
c1806f5aa6
commit
be2f72ebc1
1 changed files with 4 additions and 4 deletions
|
@ -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 => {
|
||||||
|
|
Loading…
Reference in a new issue