git-snip 0.2.0

Snip local Git branches that do not exist on the remote.
Documentation
use clap::Parser;

/// Command-line arguments for git-snip.
#[derive(Parser, Debug)]
#[command(author, version, about, long_about = None)]
struct Cli {
    /// Continue without confirmation.
    #[arg(short, long)]
    yes: bool,

    /// Install post-merge & post-rewrite hook to automatically run git-snip.
    #[arg(short, long)]
    install_hook: bool,
}

/// Main entry point for git-snip.
fn main() {
    let cli = Cli::parse();
    if let Err(err) = git_snip::run(cli.yes, cli.install_hook) {
        // Print a user-friendly error message
        eprintln!("Error: {err}");
        std::process::exit(1);
    }
}

#[cfg(test)]
mod tests {
    use super::*;
    use clap::CommandFactory;

    #[test]
    fn verify_cli() {
        Cli::command().debug_assert()
    }
}