Skip to content

Commit

Permalink
cmd squash: alias --to for the --into flag
Browse files Browse the repository at this point in the history
I keep typing `--to` since I'm used to `jj move` interface. It is
also shorter.

Currently, if I type `--to`, clap unhelpfully suggests whether I
meant `--tool`.
  • Loading branch information
ilyagr committed Apr 3, 2024
1 parent bb87fac commit 670e6ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* `jj log` now includes synthetic nodes in the graph where some revisions were
elided.

* `jj squash` now accepts `--from` and `--into` (mutually exclusive with `-r`).
It can thereby be for all use cases where `jj move` can be used. The `--from`
argument accepts a revset that resolves to more than one revision.
* `jj squash` now accepts `--from` and `--into` (also aliased as `--to`) if `-r`
is not specified. It can now be used for all use cases where `jj move` could
previously be used. The `--from` argument accepts a revset that resolves to
more than one revision.

* Commit templates now support `immutable` keyword.

Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/squash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub(crate) struct SquashArgs {
#[arg(long, conflicts_with = "revision")]
from: Option<RevisionArg>,
/// Revision to squash into (default: @)
#[arg(long, conflicts_with = "revision")]
#[arg(long, conflicts_with = "revision", visible_alias = "to")]
into: Option<RevisionArg>,
/// The description to use for squashed revision (don't open editor)
#[arg(long = "message", short, value_name = "MESSAGE")]
Expand Down

0 comments on commit 670e6ac

Please sign in to comment.