From dea268c389e891bc7f048362c766119f4a3b1928 Mon Sep 17 00:00:00 2001 From: Alexis Sellier Date: Mon, 14 Nov 2022 17:43:06 +0100 Subject: [PATCH] Implement `rad-push` Signed-off-by: Alexis Sellier --- radicle-cli/src/commands.rs | 2 + radicle-cli/src/commands/push.rs | 134 +++++++++++++++++++++++++++++++ radicle-cli/src/git.rs | 26 ++---- radicle/src/git.rs | 2 +- 4 files changed, 143 insertions(+), 21 deletions(-) create mode 100644 radicle-cli/src/commands/push.rs diff --git a/radicle-cli/src/commands.rs b/radicle-cli/src/commands.rs index f97f68a2..5e58c099 100644 --- a/radicle-cli/src/commands.rs +++ b/radicle-cli/src/commands.rs @@ -14,6 +14,8 @@ pub mod rad_init; pub mod rad_inspect; #[path = "commands/ls.rs"] pub mod rad_ls; +#[path = "commands/push.rs"] +pub mod rad_push; #[path = "commands/rm.rs"] pub mod rad_rm; #[path = "commands/self.rs"] diff --git a/radicle-cli/src/commands/push.rs b/radicle-cli/src/commands/push.rs new file mode 100644 index 00000000..ed8dab63 --- /dev/null +++ b/radicle-cli/src/commands/push.rs @@ -0,0 +1,134 @@ +use std::ffi::OsString; +use std::path::Path; + +use radicle::git; + +use crate::terminal as term; +use crate::terminal::args::{Args, Error, Help}; + +use anyhow::anyhow; + +pub const HELP: Help = Help { + name: "push", + description: env!("CARGO_PKG_DESCRIPTION"), + version: env!("CARGO_PKG_VERSION"), + usage: r#" +Usage + + rad push [--all] [--[no-]sync] [