Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
cli: mark `rad fork` as obsolete
Archived fintohaps opened 3 months ago

The rad fork command was found to be confusing both in name and function. Rather than creating a hard fork of a repository, with a new identity, it pushes the default branch to the local user’s namespace.

This change modifies the copy of the help output, and marks the command as obsolete.

3 files changed +5 -3 02318f19 ce488ea1
modified crates/radicle-cli/examples/rad-help.md
@@ -20,7 +20,7 @@ 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
+
  fork      [OBSOLETE] Copy the default branch of the repository under the current user's namespace
  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::obsolete("rad fork");
    let profile = ctx.profile()?;
    let signer = profile.signer()?;
    let storage = &profile.storage;
modified crates/radicle-cli/src/commands/fork/args.rs
@@ -1,6 +1,7 @@
use radicle::identity::RepoId;

-
const ABOUT: &str = "Create a fork of a repository";
+
const ABOUT: &str =
+
    "[OBSOLETE] Copy the default branch of the repository under the current user's namespace";

#[derive(Debug, clap::Parser)]
#[command(about = ABOUT, disable_version_flag = true)]