commit_wizard/cli/cmd/push/
mod.rs1use clap::Args as ClapArgs;
2
3use crate::{
4 cli::CliResult,
5 core::{commit, context::Context},
6};
7
8#[derive(Debug, Clone, ClapArgs)]
9#[command(about = "Push local Git changes while applying Commit Wizard push-time policy checks")]
10pub struct Args {
11 #[arg(long)]
13 pub from: Option<String>,
14 #[arg(long, default_value = "HEAD")]
16 pub to: String,
17 #[arg(long, default_value = "origin")]
19 pub remote: String,
20 #[arg(long)]
22 pub branch: Option<String>,
23 #[arg(long)]
25 pub allow_empty: bool,
26}
27
28pub async fn run(ctx: &Context, args: Args) -> CliResult<()> {
29 commit::push::run(
30 ctx,
31 args.from,
32 args.to,
33 args.remote,
34 args.branch,
35 args.allow_empty,
36 )
37}