mirror of
https://github.com/msfjarvis/gitice
synced 2025-08-15 09:37:00 +05:30
all: sync up with other Rust repos
This commit is contained in:
parent
e0deedafca
commit
593a73a506
9 changed files with 161 additions and 88 deletions
25
src/cli.rs
25
src/cli.rs
|
@ -1,37 +1,28 @@
|
|||
use clap::{crate_authors, crate_description, crate_name, crate_version, AppSettings, Clap};
|
||||
use clap::{AppSettings, Parser};
|
||||
|
||||
#[derive(Clap)]
|
||||
#[clap(
|
||||
name = crate_name!(),
|
||||
version = crate_version!(),
|
||||
author = crate_authors!(),
|
||||
about = crate_description!(),
|
||||
setting = AppSettings::ColoredHelp,
|
||||
setting = AppSettings::DeriveDisplayOrder,
|
||||
setting = AppSettings::SubcommandRequiredElseHelp,
|
||||
)]
|
||||
#[derive(Parser)]
|
||||
#[clap(author, version, about)]
|
||||
#[clap(global_setting(AppSettings::DeriveDisplayOrder))]
|
||||
pub(crate) struct Opts {
|
||||
#[clap(subcommand)]
|
||||
pub(crate) subcommand: SubCommand,
|
||||
}
|
||||
|
||||
#[derive(Clap)]
|
||||
#[derive(Parser)]
|
||||
pub(crate) enum SubCommand {
|
||||
Freeze(Freeze),
|
||||
Thaw(Thaw),
|
||||
}
|
||||
|
||||
/// recursively find git repos and record their states into a lockfile
|
||||
#[derive(Clap)]
|
||||
#[clap(setting = AppSettings::ColoredHelp)]
|
||||
#[derive(Parser)]
|
||||
pub(crate) struct Freeze {
|
||||
/// directory to search and freeze repos from.
|
||||
pub(crate) directory: String,
|
||||
}
|
||||
|
||||
/// takes the given
|
||||
#[derive(Clap)]
|
||||
#[clap(setting = AppSettings::ColoredHelp)]
|
||||
/// takes the given lockfile and clones them back into the given directory
|
||||
#[derive(Parser)]
|
||||
pub(crate) struct Thaw {
|
||||
/// directory to put cloned repos into.
|
||||
pub(crate) directory: String,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue