upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/sub_commands/pull.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/sub_commands/pull.rs')
-rw-r--r--src/sub_commands/pull.rs26
1 files changed, 26 insertions, 0 deletions
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 @@
1
2
3use clap::Args;
4use nostr::{Keys};
5
6use crate::{fetch_pull_push::fetch_pull_push};
7
8#[derive(Args)]
9pub struct PullSubCommand {
10 /// branch nevent or hex to pull into a new local branch
11 #[arg(short, long)]
12 pub branch: Option<String>,
13}
14
15pub fn pull_from_relays(keys: Option<&Keys>, sub_command_args: &PullSubCommand) {
16
17 fetch_pull_push(
18 keys,
19 true,
20 false,
21 sub_command_args.branch.clone(),
22 false,
23 None,
24 None,
25 );
26}