diff --git a/radicle-cli/examples/rad-init.md b/radicle-cli/examples/rad-init.md index 6d1329f1..3929460c 100644 --- a/radicle-cli/examples/rad-init.md +++ b/radicle-cli/examples/rad-init.md @@ -18,7 +18,7 @@ Your project id is rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji. You can show it any time b rad . To publish your project to the network, run: - rad push + git push ``` diff --git a/radicle-cli/examples/rad-patch.md b/radicle-cli/examples/rad-patch.md index 67f563fa..235e431a 100644 --- a/radicle-cli/examples/rad-patch.md +++ b/radicle-cli/examples/rad-patch.md @@ -34,7 +34,7 @@ master <- z6MknSL…StBU8Vi/flux-capacitor-power (3e674d1) ✓ Patch 191a14e520f2eeff7c0e3ee0a5523c5217eecb89 created 🌱 To publish your patch to the network, run: - rad push + git push rad ``` It will now be listed as one of the project's open patches. diff --git a/radicle-cli/examples/workflow/1-new-project.md b/radicle-cli/examples/workflow/1-new-project.md index ef5255f1..519c4c36 100644 --- a/radicle-cli/examples/workflow/1-new-project.md +++ b/radicle-cli/examples/workflow/1-new-project.md @@ -18,7 +18,7 @@ Your project id is rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji. You can show it any time b rad . To publish your project to the network, run: - rad push + git push ``` diff --git a/radicle-cli/examples/workflow/4-patching-contributor.md b/radicle-cli/examples/workflow/4-patching-contributor.md index aeef1cbf..79b54f3c 100644 --- a/radicle-cli/examples/workflow/4-patching-contributor.md +++ b/radicle-cli/examples/workflow/4-patching-contributor.md @@ -34,7 +34,7 @@ master <- z6Mkt67…v4N1tRk/flux-capacitor-power (3e674d1) ✓ Patch a07ef7743a32a2e902672ea3526d1db6ee08108a created 🌱 To publish your patch to the network, run: - rad push + git push rad ``` It will now be listed as one of the project's open patches. diff --git a/radicle-cli/examples/workflow/5-patching-maintainer.md b/radicle-cli/examples/workflow/5-patching-maintainer.md index 3e79431e..40efbc28 100644 --- a/radicle-cli/examples/workflow/5-patching-maintainer.md +++ b/radicle-cli/examples/workflow/5-patching-maintainer.md @@ -70,7 +70,7 @@ Fast-forward create mode 100644 README.md create mode 100644 REQUIREMENTS.md ✓ Updated master f2de534 -> f6484e0 via fast-forward -✓ Patch state updated, use `rad push` to publish +✓ Patch state updated, use `git push rad` to publish ``` The patch is now merged and closed :). diff --git a/radicle-cli/src/commands.rs b/radicle-cli/src/commands.rs index 1e86d3c2..8edd79c1 100644 --- a/radicle-cli/src/commands.rs +++ b/radicle-cli/src/commands.rs @@ -36,8 +36,6 @@ pub mod rad_node; pub mod rad_patch; #[path = "commands/path.rs"] pub mod rad_path; -#[path = "commands/push.rs"] -pub mod rad_push; #[path = "commands/remote.rs"] pub mod rad_remote; #[path = "commands/review.rs"] diff --git a/radicle-cli/src/commands/help.rs b/radicle-cli/src/commands/help.rs index 659d484a..c628d0a5 100644 --- a/radicle-cli/src/commands/help.rs +++ b/radicle-cli/src/commands/help.rs @@ -30,7 +30,6 @@ const COMMANDS: &[Help] = &[ rad_node::HELP, rad_patch::HELP, rad_path::HELP, - rad_push::HELP, rad_review::HELP, rad_rm::HELP, rad_self::HELP, diff --git a/radicle-cli/src/commands/init.rs b/radicle-cli/src/commands/init.rs index 2e85b68b..a3e4c558 100644 --- a/radicle-cli/src/commands/init.rs +++ b/radicle-cli/src/commands/init.rs @@ -206,6 +206,7 @@ pub fn init(options: Options, profile: &profile::Profile) -> anyhow::Result<()> let mut node = radicle::Node::new(profile.socket()); let mut spinner = term::spinner("Initializing..."); + let mut push_cmd = String::from("git push"); match radicle::rad::init( &repo, @@ -242,6 +243,8 @@ pub fn init(options: Options, profile: &profile::Profile) -> anyhow::Result<()> proj.default_branch(), &radicle::git::refs::workdir::branch(proj.default_branch()), )?; + } else { + push_cmd = format!("git push {}", *radicle::rad::REMOTE_NAME); } if options.setup_signing { @@ -277,7 +280,7 @@ pub fn init(options: Options, profile: &profile::Profile) -> anyhow::Result<()> if !options.announce { term::blank(); term::info!("To publish your project to the network, run:"); - term::indented(term::format::secondary("rad push")); + term::indented(term::format::secondary(push_cmd)); } term::blank(); } diff --git a/radicle-cli/src/commands/merge.rs b/radicle-cli/src/commands/merge.rs index 2513b7a0..bd1c8707 100644 --- a/radicle-cli/src/commands/merge.rs +++ b/radicle-cli/src/commands/merge.rs @@ -298,7 +298,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> { term::success!( "Patch state updated, use {} to publish", - term::format::secondary("`rad push`") + term::format::secondary("`git push rad`") ); Ok(()) diff --git a/radicle-cli/src/commands/patch/create.rs b/radicle-cli/src/commands/patch/create.rs index 95d542b8..e00283e5 100644 --- a/radicle-cli/src/commands/patch/create.rs +++ b/radicle-cli/src/commands/patch/create.rs @@ -132,7 +132,7 @@ pub fn run( } } else { term::info!("To publish your patch to the network, run:"); - term::indented(term::format::secondary("rad push")); + term::indented(term::format::secondary("git push rad")); } Ok(()) diff --git a/radicle-cli/src/commands/push.rs b/radicle-cli/src/commands/push.rs deleted file mode 100644 index fde0eb48..00000000 --- a/radicle-cli/src/commands/push.rs +++ /dev/null @@ -1,119 +0,0 @@ -use std::ffi::OsString; -use std::path::Path; - -use anyhow::anyhow; - -use radicle::git; - -use crate::terminal as term; -use crate::terminal::args::{Args, Error, Help}; - -pub const HELP: Help = Help { - name: "push", - description: "Publish a project to the network", - version: env!("CARGO_PKG_VERSION"), - usage: r#" -Usage - - rad push [