Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
REVIEW: Sort these struct members alphabetically
Lorenz Leutgeb committed 6 months ago
commit 051c810b45e5b8d668e05381bb5ea326c54353f1
parent 61f15143126676aebc9c675dbdcfebb6533c34e8
2 files changed +23 -13
modified crates/radicle-cli/src/commands/inspect.rs
@@ -3,7 +3,7 @@
mod args;

pub use args::Args;
-
pub(crate) use args::Target;
+
pub(crate) use args::TargetArgs;
pub(crate) use args::ABOUT;

use std::collections::HashMap;
@@ -42,7 +42,7 @@ pub fn run(args: Args, ctx: impl term::Context) -> anyhow::Result<()> {
    };

    let target = match args.target {
-
        None => Target {
+
        None => TargetArgs {
            rid: true,
            payload: false,
            refs: false,
modified crates/radicle-cli/src/commands/inspect/args.rs
@@ -7,34 +7,44 @@ the current repository is inspected.

#[derive(Debug, Parser)]
#[group(multiple = false)]
-
pub(crate) struct Target {
-
    /// Return the repository identifier (RID)
+
pub(crate) struct TargetArgs {
+
    /// Inspect the repository's delegates
    #[arg(long)]
-
    pub(crate) rid: bool,
+
    pub(crate) delegates: bool,
+

+
    /// Show the history of the repository identity document
+
    #[arg(long)]
+
    pub(crate) history: bool,
+

+
    /// Inspect the identity document
+
    #[arg(long)]
+
    pub(crate) identity: bool,

    /// Inspect the repository's identity payload
    #[arg(long)]
    pub(crate) payload: bool,

+
    /// Inspect the repository's seeding policy
+
    #[arg(long)]
+
    pub(crate) policy: bool,
+

    /// Inspect the repository's refs on the local device
    #[arg(long)]
    pub(crate) refs: bool,

-
    /// Inspect the values of `rad/sigrefs` for all remotes of this repository
+
    /// Return the repository identifier (RID)
    #[arg(long)]
-
    pub(crate) sigrefs: bool,
+
    pub(crate) rid: bool,

-
    /// Inspect the identity document
+
    /// Inspect the values of `rad/sigrefs` for all remotes of this repository
    #[arg(long)]
-
    pub(crate) identity: bool,
+
    pub(crate) sigrefs: bool,

    /// Inspect the repository's visibility
    #[arg(long)]
    pub(crate) visibility: bool,
+
}

-
    /// Inspect the repository's delegates
-
    #[arg(long)]
-
    pub(crate) delegates: bool,

    /// Inspect the repository's seeding policy
    #[arg(long)]
@@ -53,5 +63,5 @@ pub struct Args {
    pub(crate) repo: Option<String>,

    #[clap(flatten)]
-
    pub(crate) target: Option<Target>,
+
    pub(crate) target: Option<TargetArgs>,
}