1use clap::Parser;
2
3#[derive(Parser)]
4#[command(name = "git rewrite", bin_name = "git rewrite")]
5#[command(author, version, about = "Rewrite Git repository history, trees, and blobs", long_about = None)]
6pub struct Cli {
7 #[command(subcommand)]
8 pub command: Command,
9}
10
11#[derive(clap::Subcommand)]
12pub enum Command {
13 Tree(TreeArgs),
15}
16
17#[derive(clap::Args)]
18pub struct TreeArgs {
19 #[arg(default_value = "HEAD")]
21 pub treeish: String,
22
23 #[arg(long = "only", required = true)]
25 pub patterns: Vec<String>,
26
27 #[arg(long)]
29 pub allow_dirty: bool,
30}