git_bonsai/
cliargs.rs

1/*
2 * Copyright 2021 Aurélien Gâteau <mail@agateau.com>
3 *
4 * This file is part of git-bonsai.
5 *
6 * Git-bonsai is free software: you can redistribute it and/or modify it under
7 * the terms of the GNU General Public License as published by the Free
8 * Software Foundation, either version 3 of the License, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License along with
17 * this program.  If not, see <http://www.gnu.org/licenses/>.
18 */
19use structopt::StructOpt;
20
21#[derive(StructOpt)]
22/// Keep a git repository clean and tidy.
23///
24/// Branches can be declared as protected from suppression using `git config --add
25/// git-bonsai.protected-branches <branch>`.
26pub struct CliArgs {
27    /// Other branches to protect from suppression.
28    #[structopt(short = "x", long)]
29    pub excluded: Vec<String>,
30
31    /// Do not fetch changes
32    #[structopt(long = "no-fetch")]
33    pub no_fetch: bool,
34
35    /// Do not ask for confirmation
36    #[structopt(short = "y", long = "yes")]
37    pub yes: bool,
38}