Skip to content

Commit

Permalink
squash: add -f/-t shorthands for --from/--[in]to
Browse files Browse the repository at this point in the history
Change-Id: Id00000005f2a7f551cb7a0aa598c6265091a32d1
  • Loading branch information
avamsi committed Oct 9, 2024
1 parent 09d91ef commit 6600740
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

* New command `jj simplify-parents` will remove redundant parent edges.

* `jj squash` now supports `-f/-t` shorthands for `--from/--[in]to`.

### Fixed bugs


Expand Down
4 changes: 2 additions & 2 deletions cli/src/commands/squash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ pub(crate) struct SquashArgs {
#[arg(long, short)]
revision: Option<RevisionArg>,
/// Revision(s) to squash from (default: @)
#[arg(long, conflicts_with = "revision")]
#[arg(long, short, conflicts_with = "revision")]
from: Vec<RevisionArg>,
/// Revision to squash into (default: @)
#[arg(long, conflicts_with = "revision", visible_alias = "to")]
#[arg(long, short = 't', 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
4 changes: 2 additions & 2 deletions cli/tests/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -1972,8 +1972,8 @@ If a working-copy commit gets abandoned, it will be given a new, empty commit. T
###### **Options:**
* `-r`, `--revision <REVISION>` — Revision to squash into its parent (default: @)
* `--from <FROM>` — Revision(s) to squash from (default: @)
* `--into <INTO>` — Revision to squash into (default: @)
* `-f`, `--from <FROM>` — Revision(s) to squash from (default: @)
* `-t`, `--into <INTO>` — Revision to squash into (default: @)
* `-m`, `--message <MESSAGE>` — The description to use for squashed revision (don't open editor)
* `-u`, `--use-destination-message` — Use the description of the destination revision and discard the description(s) of the source revision(s)
* `-i`, `--interactive` — Interactively choose which parts to squash
Expand Down

0 comments on commit 6600740

Please sign in to comment.