From 7d1db6a0131e560589a4b25f5d472fdf23998a67 Mon Sep 17 00:00:00 2001 From: Lorenz Leutgeb Date: Wed, 17 Sep 2025 08:27:27 +0200 Subject: [PATCH] cli/diff: Deprecation Warning This command is just a small wrapper around `git diff` not worth maintaining. --- CHANGELOG.md | 2 ++ crates/radicle-cli/examples/rad-diff.md | 5 +++++ crates/radicle-cli/src/commands/diff.rs | 2 ++ 3 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 645f5a56..887c92cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Deprecations - The option `rad self --nid` was deprecated in favor of `rad status --only nid` +- `rad diff` was deprecated in favor of using `git diff` + ## New Features - `rad clone` now supports the flag `--bare` which works analoguously to diff --git a/crates/radicle-cli/examples/rad-diff.md b/crates/radicle-cli/examples/rad-diff.md index 64ce618a..3010a125 100644 --- a/crates/radicle-cli/examples/rad-diff.md +++ b/crates/radicle-cli/examples/rad-diff.md @@ -1,3 +1,8 @@ +``` (stderr) +$ rad diff +! Deprecated: The command/option `rad diff` is deprecated and will be removed. Please use `git diff` instead. +``` + Exploring `rad diff`. ``` ./main.c diff --git a/crates/radicle-cli/src/commands/diff.rs b/crates/radicle-cli/src/commands/diff.rs index a705bdd7..5fefb508 100644 --- a/crates/radicle-cli/src/commands/diff.rs +++ b/crates/radicle-cli/src/commands/diff.rs @@ -82,6 +82,8 @@ impl Args for Options { } pub fn run(options: Options, _ctx: impl term::Context) -> anyhow::Result<()> { + crate::warning::deprecated("rad diff", "git diff"); + let repo = rad::repo()?; let oids = options .commits