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:
authorDanConwayDev <DanConwayDev@protonmail.com>2023-05-21 11:27:04 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2023-05-21 11:27:04 +0000
commit318e467b158b158cf9eb843318dc14141d1b8c54 (patch)
tree46ec99fccfac487b1ff2dd29d3b01fb970fcb88d /src/sub_commands/pull.rs
parent2ce71c5434fb7245aad4d070e08bbf6792d79b4d (diff)
main and remaining subcommands
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}