aboutsummaryrefslogtreecommitdiff
path: root/src/config/args.rs
blob: 446c5cea0268a3c88665c9f89dba81347e3479e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use clap::{Parser, Subcommand};

#[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, 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,
}