upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/sub_commands/pull.rs
blob: 0030dbe26946ee3d9abef27e19a90154b7e814af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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<String>,
}

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,
    );
}