Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
cli: Minor cleanups
Alexis Sellier committed 3 years ago
commit fd5ac7f6afdc0bece1311f66d39277c7aae21855
parent fea14ff7b336cc300b5554f7eec9828a3cdcd78f
2 files changed +7 -7
modified radicle-cli/src/commands/clone.rs
@@ -11,7 +11,7 @@ use radicle::prelude::*;
use radicle::rad;
use radicle::storage::WriteStorage;

-
use crate::commands::rad_checkout::setup_remotes;
+
use crate::commands::rad_checkout as checkout;
use crate::project;
use crate::terminal as term;
use crate::terminal::args::{Args, Error, Help};
@@ -108,7 +108,7 @@ pub fn clone(id: Id, _interactive: Interactive, ctx: impl term::Context) -> anyh
    let default_branch = proj.default_branch().clone();

    // Setup tracking for project delegates.
-
    setup_remotes(
+
    checkout::setup_remotes(
        project::SetupRemote {
            project: id,
            default_branch,
modified radicle-cli/src/commands/self.rs
@@ -17,14 +17,14 @@ Usage

Options

-
    --profile    Show Profile ID
+
    --id         Show ID
    --help       Show help
"#,
};

#[derive(Debug)]
enum Show {
-
    Profile,
+
    Id,
    All,
}

@@ -42,8 +42,8 @@ impl Args for Options {

        while let Some(arg) = parser.next()? {
            match arg {
-
                Long("profile") if show.is_none() => {
-
                    show = Some(Show::Profile);
+
                Long("id") if show.is_none() => {
+
                    show = Some(Show::Id);
                }
                Long("help") => {
                    return Err(Error::Help.into());
@@ -65,7 +65,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
    let profile = ctx.profile()?;

    match options.show {
-
        Show::Profile => {
+
        Show::Id => {
            term::print(profile.id());
        }
        Show::All => all(&profile)?,