From 2b03148b7519717dfec8aafcf56d5aa0d086e4d0 Mon Sep 17 00:00:00 2001 From: "Alexis (Poliorcetics) Bourget" Date: Sun, 18 Feb 2024 17:47:12 +0100 Subject: [PATCH] cli: rename --verbose to --debug to better fit what it does --- CHANGELOG.md | 2 ++ cli/src/cli_util.rs | 8 ++++---- cli/tests/cli-reference@.md.snap | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c141d4ab30b..ef967f418ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * `jj git fetch` now automatically prints new remote branches and tags by default. +* `--verbose(-v)` is now `--debug` (no short option since it's not intended to be used often) + ### Fixed bugs * On Windows, symlinks in the repo are now materialized as regular files in the diff --git a/cli/src/cli_util.rs b/cli/src/cli_util.rs index 82fa387531a..202b2a1ba6a 100644 --- a/cli/src/cli_util.rs +++ b/cli/src/cli_util.rs @@ -2497,9 +2497,9 @@ pub struct GlobalArgs { /// do that, but it is possible. #[arg(long, visible_alias = "at-op", global = true, default_value = "@")] pub at_operation: String, - /// Enable verbose logging - #[arg(long, short = 'v', global = true)] - pub verbose: bool, + /// Enable debug logging + #[arg(long, global = true)] + pub debug: bool, #[command(flatten)] pub early_args: EarlyArgs, @@ -2743,7 +2743,7 @@ pub fn parse_args( .try_get_matches_from(string_args)?; let args: Args = Args::from_arg_matches(&matches).unwrap(); - if args.global_args.verbose { + if args.global_args.debug { // TODO: set up verbose logging as early as possible tracing_subscription.enable_verbose_logging()?; } diff --git a/cli/tests/cli-reference@.md.snap b/cli/tests/cli-reference@.md.snap index 8e11a0256f8..5a4274d170f 100644 --- a/cli/tests/cli-reference@.md.snap +++ b/cli/tests/cli-reference@.md.snap @@ -154,7 +154,7 @@ repository. * `--at-operation ` — Operation to load the repo at Default value: `@` -* `-v`, `--verbose` — Enable verbose logging +* `--debug` — Enable debug logging Possible values: `true`, `false`