From 9e3759449bb7c33bd54022c26fb052679731060d Mon Sep 17 00:00:00 2001 From: Alexander Kiselev Date: Thu, 5 Feb 2026 14:44:30 -0800 Subject: [PATCH] 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 --- src/cli.rs | 4 ++++ src/main.rs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/cli.rs b/src/cli.rs index 4743612..fefcf76 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -623,6 +623,8 @@ pub struct DiffProgramsArgs { pub program2: String, #[arg(long)] pub format: Option, + #[arg(long)] + pub project: Option, } #[derive(Args, Clone, Serialize, Deserialize, Debug)] @@ -633,6 +635,8 @@ pub struct DiffFunctionsArgs { pub func2: String, #[arg(long)] pub format: Option, + #[arg(long)] + pub project: Option, } #[derive(Subcommand, Clone, Serialize, Deserialize, Debug)] diff --git a/src/main.rs b/src/main.rs index c6d50d1..130d4d4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -223,6 +223,10 @@ fn extract_project_from_command(command: &Commands) -> Option { 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, }