fix: add --project to DiffProgramsArgs and DiffFunctionsArgs

The diff subcommands were missing --project fields, causing clap to
reject the argument when tests passed --project to diff commands.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Alexander Kiselev
2026-02-05 14:44:30 -08:00
co-authored by Claude Opus 4.6
parent 45ae55c146
commit 9e3759449b
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -623,6 +623,8 @@ pub struct DiffProgramsArgs {
pub program2: String,
#[arg(long)]
pub format: Option<String>,
#[arg(long)]
pub project: Option<String>,
}
#[derive(Args, Clone, Serialize, Deserialize, Debug)]
@@ -633,6 +635,8 @@ pub struct DiffFunctionsArgs {
pub func2: String,
#[arg(long)]
pub format: Option<String>,
#[arg(long)]
pub project: Option<String>,
}
#[derive(Subcommand, Clone, Serialize, Deserialize, Debug)]
+4
View File
@@ -223,6 +223,10 @@ fn extract_project_from_command(command: &Commands) -> Option<String> {
cli::ProgramCommands::Info(args) => args.project.clone(),
cli::ProgramCommands::Export(args) => args.project.clone(),
},
Commands::Diff(cmd) => match cmd {
cli::DiffCommands::Programs(args) => args.project.clone(),
cli::DiffCommands::Functions(args) => args.project.clone(),
},
Commands::Batch(args) => args.project.clone(),
_ => None,
}