Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli(duplicate, abandon): allow multiple -r options #3351

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

* `jj branch list` now supports a `--conflicted/-c` option to show only conflicted branches.

* `jj duplicate` and `jj abandon` can now take more than a single `-r` argument,
for consistency with other commands.

### Fixed bugs

## [0.15.1] - 2024-03-06
Expand Down
4 changes: 2 additions & 2 deletions cli/src/commands/abandon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ pub(crate) struct AbandonArgs {
#[arg(long, short)]
summary: bool,
/// Ignored (but lets you pass `-r` for consistency with other commands)
#[arg(short = 'r', hide = true)]
unused_revision: bool,
#[arg(short = 'r', hide = true, action = clap::ArgAction::Count)]
unused_revision: u8,
}

#[instrument(skip_all)]
Expand Down
4 changes: 2 additions & 2 deletions cli/src/commands/duplicate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ pub(crate) struct DuplicateArgs {
#[arg(default_value = "@")]
revisions: Vec<RevisionArg>,
/// Ignored (but lets you pass `-r` for consistency with other commands)
#[arg(short = 'r', hide = true)]
unused_revision: bool,
#[arg(short = 'r', hide = true, action = clap::ArgAction::Count)]
unused_revision: u8,
}

#[instrument(skip_all)]
Expand Down
4 changes: 2 additions & 2 deletions cli/src/commands/new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ pub(crate) struct NewArgs {
#[arg(default_value = "@")]
pub(crate) revisions: Vec<RevisionArg>,
/// Ignored (but lets you pass `-r` for consistency with other commands)
#[arg(short = 'r', hide = true, overrides_with = "unused_revision")]
unused_revision: bool,
#[arg(short = 'r', hide = true, action = clap::ArgAction::Count)]
unused_revision: u8,
/// The change description to use
#[arg(long = "message", short, value_name = "MESSAGE")]
message_paragraphs: Vec<String>,
Expand Down
9 changes: 0 additions & 9 deletions cli/tests/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,6 @@ If a working-copy commit gets abandoned, it will be given a new, empty commit. T

* `-r` — Ignored (but lets you pass `-r` for consistency with other commands)

Possible values: `true`, `false`




## `jj backout`
Expand Down Expand Up @@ -703,9 +700,6 @@ Create a new change with the same content as an existing one

* `-r` — Ignored (but lets you pass `-r` for consistency with other commands)

Possible values: `true`, `false`




## `jj edit`
Expand Down Expand Up @@ -1118,9 +1112,6 @@ For more information, see https://github.com/martinvonz/jj/blob/main/docs/workin
###### **Options:**

* `-r` — Ignored (but lets you pass `-r` for consistency with other commands)

Possible values: `true`, `false`

* `-m`, `--message <MESSAGE>` — The change description to use
* `-L`, `--allow-large-revsets` — Deprecated. Please prefix the revset with `all:` instead

Expand Down