Skip to content

Commit 8959b21

Browse files
committed
Allow the -n argument as no-op to make them more compatible.
1 parent 9863d75 commit 8959b21

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Diff for: src/plumbing/main.rs

+1
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ pub fn main() -> Result<()> {
149149
#[cfg(feature = "gitoxide-core-tools-clean")]
150150
Subcommands::Clean(crate::plumbing::options::clean::Command {
151151
debug,
152+
dry_run: _,
152153
execute,
153154
ignored,
154155
precious,

Diff for: src/plumbing/options/mod.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,6 @@ pub mod corpus {
274274
}
275275

276276
pub mod config {
277-
278277
use gix::bstr::BString;
279278

280279
/// Print all entries in a configuration file or access other sub-commands
@@ -506,6 +505,9 @@ pub mod clean {
506505
/// Print additional debug information to help understand decisions it made.
507506
#[arg(long)]
508507
pub debug: bool,
508+
/// A dummy to easy with muscle-memory. This flag is assumed if provided or not, and has no effect.
509+
#[arg(short = 'n', long)]
510+
pub dry_run: bool,
509511
/// Actually perform the operation, which deletes files on disk without chance of recovery.
510512
#[arg(long, short = 'e')]
511513
pub execute: bool,
@@ -689,6 +691,7 @@ pub mod revision {
689691
DiffOrGit,
690692
}
691693
}
694+
692695
#[derive(Debug, clap::Subcommand)]
693696
#[clap(visible_alias = "rev", visible_alias = "r")]
694697
pub enum Subcommands {
@@ -859,7 +862,6 @@ pub mod index {
859862
}
860863

861864
pub mod submodule {
862-
863865
#[derive(Debug, clap::Parser)]
864866
pub struct Platform {
865867
#[clap(subcommand)]

0 commit comments

Comments
 (0)