Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
cli/fork: Deprecate
✗ CI failure Lorenz Leutgeb committed 3 months ago
commit e7520c0b9fe86e739677bf0357bba5ee27523585
parent b937a93892db3d80833b3cdde3bc37935151e274
3 failed (3 total) View logs
4 files changed +14 -3
modified crates/radicle-cli/examples/rad-help.md
@@ -20,7 +20,6 @@ Commands:
  config    Manage your local Radicle configuration
  debug     Write out information to help debug your Radicle node remotely
  follow    Manage node follow policies
-
  fork      Create a fork of a repository
  id        Manage repository identities
  inbox     Manage your Radicle notifications
  init      Initialize a Radicle repository
modified crates/radicle-cli/src/commands/fork.rs
@@ -4,11 +4,12 @@ use anyhow::Context as _;

use radicle::rad;

-
use crate::terminal as term;
+
use crate::{terminal as term, warning};

pub use args::Args;

pub fn run(args: Args, ctx: impl term::Context) -> anyhow::Result<()> {
+
    warning::deprecated("rad fork", "git push");
    let profile = ctx.profile()?;
    let signer = profile.signer()?;
    let storage = &profile.storage;
modified crates/radicle-cli/src/commands/fork/args.rs
@@ -1,6 +1,16 @@
use radicle::identity::RepoId;

-
const ABOUT: &str = "Create a fork of a repository";
+
const ABOUT: &str = "Create a fork of a repository
+

+
This command is deprecated and will be removed.
+

+
Instead of using `rad fork`, use `git push` to push any references to
+
your own namespace of a Radicle repository. Usually
+

+
    git push rad main
+

+
would suffice to push the default branch (here named 'main').
+
";

#[derive(Debug, clap::Parser)]
#[command(about = ABOUT, disable_version_flag = true)]
modified crates/radicle-cli/src/main.rs
@@ -68,6 +68,7 @@ enum Command {
    Config(config::Args),
    Debug(debug::Args),
    Follow(follow::Args),
+
    #[command(hide = true)] // `rad fork` command is deprecated
    Fork(fork::Args),
    Id(id::Args),
    Inbox(inbox::Args),