Skip to content

Commit

Permalink
cli: rename --verbose to --debug to better fit what it does
Browse files Browse the repository at this point in the history
  • Loading branch information
poliorcetics committed Feb 18, 2024
1 parent 06d67f0 commit 2b03148
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions cli/src/cli_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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()?;
}
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ repository.
* `--at-operation <AT_OPERATION>` — Operation to load the repo at
Default value: `@`
* `-v`, `--verbose` — Enable verbose logging
* `--debug` — Enable debug logging
Possible values: `true`, `false`
Expand Down

0 comments on commit 2b03148

Please sign in to comment.