hive-forge: default pr create --push remote to origin
Fresh clones only have origin, not forge. The --remote override already covers anyone using a different name. Closes #4538
This commit is contained in:
parent
2e97ab9dc5
commit
18f0199566
2 changed files with 4 additions and 4 deletions
|
|
@ -3,7 +3,7 @@
|
|||
//! the PR URL.
|
||||
//!
|
||||
//! With `--push` the local `--head` branch is pushed to `--remote`
|
||||
//! (default `forge`) before the API call, and forgejo's post-push
|
||||
//! (default `origin`) before the API call, and forgejo's post-push
|
||||
//! "Create a new pull request" / "Visit the existing pull request"
|
||||
//! hint block is filtered out of git's stderr (we print the canonical
|
||||
//! URL ourselves once the API returns). Other git stderr passes
|
||||
|
|
@ -56,7 +56,7 @@ pub struct Args {
|
|||
/// Push the local `--head` branch to `--remote` before creating the PR.
|
||||
#[arg(long)]
|
||||
push: bool,
|
||||
/// Remote to push to (default: `forge`, or `origin` in `--agit` mode).
|
||||
/// Remote to push to (default: `origin`).
|
||||
#[arg(long)]
|
||||
remote: Option<String>,
|
||||
/// Open the PR via Forgejo's `AGit` flow instead of pushing a branch —
|
||||
|
|
@ -98,7 +98,7 @@ pub fn run(client: &Client, args: Args) -> Result<()> {
|
|||
.head
|
||||
.as_deref()
|
||||
.expect("clap requires --head unless --agit");
|
||||
let remote = args.remote.as_deref().unwrap_or("forge");
|
||||
let remote = args.remote.as_deref().unwrap_or("origin");
|
||||
if args.push {
|
||||
push_branch(remote, head)?;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue