diff --git a/radicle-cli/src/commands.rs b/radicle-cli/src/commands.rs index 9764c6fc..eabd19b4 100644 --- a/radicle-cli/src/commands.rs +++ b/radicle-cli/src/commands.rs @@ -10,6 +10,8 @@ pub mod rad_clone; pub mod rad_cob; #[path = "commands/delegate.rs"] pub mod rad_delegate; +#[path = "commands/diff.rs"] +pub mod rad_diff; #[path = "commands/edit.rs"] pub mod rad_edit; #[path = "commands/fork.rs"] diff --git a/radicle-cli/src/commands/diff.rs b/radicle-cli/src/commands/diff.rs new file mode 100644 index 00000000..8261d6a4 --- /dev/null +++ b/radicle-cli/src/commands/diff.rs @@ -0,0 +1,145 @@ +use std::ffi::OsString; + +use anyhow::anyhow; + +use radicle::git; +use radicle::rad; +use radicle_surf as surf; + +use crate::git::pretty_diff::ToPretty as _; +use crate::git::Rev; +use crate::terminal as term; +use crate::terminal::args::{Args, Error, Help}; +use crate::terminal::highlight::Highlighter; +use crate::terminal::{Constraint, Element as _}; + +pub const HELP: Help = Help { + name: "diff", + description: "Show changes between commits", + version: env!("CARGO_PKG_VERSION"), + usage: r#" +Usage + + rad diff [] [--staged] [