aboutsummaryrefslogtreecommitdiff
path: root/src/config/args.rs
blob: 9c0973f295286b91ac5b590e5bb7810c714a7adc (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::{Parser, Subcommand, ArgEnum};

#[derive(Parser, Clone, Debug)]
#[clap(
    override_usage("gtree <SUBCOMMAND> [SCOPE]")
)]
/// Sync Gitlab Trees
pub struct Args {
    #[clap(subcommand)]
    pub command: Commands,

    /// Only operate on this subtree
    #[clap(global = true)]
    pub scope: Option<String>,
}

#[derive(PartialEq, Clone, Debug)]
#[derive(Subcommand)]
pub enum Commands {
    /// Download new repositories and delete old ones, also update
    Sync,
    /// Pull and Push new commits to and from the cloned repos
    Update,
    /// List Directories
    List,
}