From 8959b2153f32c2fba599e3dfa1720e155b462b94 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sun, 25 Feb 2024 10:04:37 +0100 Subject: [PATCH] Allow the `-n` argument as no-op to make them more compatible. --- src/plumbing/main.rs | 1 + src/plumbing/options/mod.rs | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plumbing/main.rs b/src/plumbing/main.rs index 32dc404cffa..aeb589c584f 100644 --- a/src/plumbing/main.rs +++ b/src/plumbing/main.rs @@ -149,6 +149,7 @@ pub fn main() -> Result<()> { #[cfg(feature = "gitoxide-core-tools-clean")] Subcommands::Clean(crate::plumbing::options::clean::Command { debug, + dry_run: _, execute, ignored, precious, diff --git a/src/plumbing/options/mod.rs b/src/plumbing/options/mod.rs index a437bf641c4..690ea56ecaa 100644 --- a/src/plumbing/options/mod.rs +++ b/src/plumbing/options/mod.rs @@ -274,7 +274,6 @@ pub mod corpus { } pub mod config { - use gix::bstr::BString; /// Print all entries in a configuration file or access other sub-commands @@ -506,6 +505,9 @@ pub mod clean { /// Print additional debug information to help understand decisions it made. #[arg(long)] pub debug: bool, + /// A dummy to easy with muscle-memory. This flag is assumed if provided or not, and has no effect. + #[arg(short = 'n', long)] + pub dry_run: bool, /// Actually perform the operation, which deletes files on disk without chance of recovery. #[arg(long, short = 'e')] pub execute: bool, @@ -689,6 +691,7 @@ pub mod revision { DiffOrGit, } } + #[derive(Debug, clap::Subcommand)] #[clap(visible_alias = "rev", visible_alias = "r")] pub enum Subcommands { @@ -859,7 +862,6 @@ pub mod index { } pub mod submodule { - #[derive(Debug, clap::Parser)] pub struct Platform { #[clap(subcommand)]