use clap::Parser;
use std::path::PathBuf;
#[derive(Parser)]
#[command(name = "git-info")]
#[command(about = "A CLI tool to get git repository information")]
pub struct Cli {
#[arg(short = 'r', long = "repo-urls")]
pub repo_urls: bool,
#[arg(short = 'u', long = "last-update")]
pub last_update: bool,
#[arg(short = 'f', long = "last-fetch")]
pub last_fetch: bool,
#[arg(short = 'g', long = "repo-size")]
pub repo_size: bool,
#[arg(short = 's', long = "size")]
pub size: bool,
#[arg(short = 't', long = "tsv")]
pub tsv: bool,
pub paths: Vec<PathBuf>,
}
impl Cli {
pub fn setup_defaults(&mut self) {
if !self.repo_urls && !self.last_update && !self.last_fetch && !self.repo_size && !self.size
{
self.repo_urls = true;
self.last_update = true;
self.last_fetch = true;
self.repo_size = true;
self.size = true;
}
}
}