From 318e467b158b158cf9eb843318dc14141d1b8c54 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Sun, 21 May 2023 11:27:04 +0000 Subject: main and remaining subcommands --- src/sub_commands/pull.rs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/sub_commands/pull.rs (limited to 'src/sub_commands/pull.rs') diff --git a/src/sub_commands/pull.rs b/src/sub_commands/pull.rs new file mode 100644 index 0000000..0030dbe --- /dev/null +++ b/src/sub_commands/pull.rs @@ -0,0 +1,26 @@ + + +use clap::Args; +use nostr::{Keys}; + +use crate::{fetch_pull_push::fetch_pull_push}; + +#[derive(Args)] +pub struct PullSubCommand { + /// branch nevent or hex to pull into a new local branch + #[arg(short, long)] + pub branch: Option, +} + +pub fn pull_from_relays(keys: Option<&Keys>, sub_command_args: &PullSubCommand) { + + fetch_pull_push( + keys, + true, + false, + sub_command_args.branch.clone(), + false, + None, + None, + ); +} -- cgit v1.2.3