diff --git a/CHANGELOG.md b/CHANGELOG.md index f75357165..50ef5f51c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). * `jj op undo` now reports information on the operation that has been undone. +* `jj squash`: the `-k` flag can be used as a shorthand for `--keep-emptied`. + ### Fixed bugs * Fixed panic when parsing invalid conflict markers of a particular form. diff --git a/cli/src/commands/squash.rs b/cli/src/commands/squash.rs index 86750ecbe..a9e2677d4 100644 --- a/cli/src/commands/squash.rs +++ b/cli/src/commands/squash.rs @@ -82,7 +82,7 @@ pub(crate) struct SquashArgs { #[arg(conflicts_with_all = ["interactive", "tool"], value_hint = clap::ValueHint::AnyPath)] paths: Vec, /// The source revision will not be abandoned - #[arg(long)] + #[arg(long, short)] keep_emptied: bool, } diff --git a/cli/tests/cli-reference@.md.snap b/cli/tests/cli-reference@.md.snap index 8d255d7af..e8c52c652 100644 --- a/cli/tests/cli-reference@.md.snap +++ b/cli/tests/cli-reference@.md.snap @@ -1925,7 +1925,7 @@ If a working-copy commit gets abandoned, it will be given a new, empty commit. T * `-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 * `--tool ` — Specify diff editor to be used (implies --interactive) -* `--keep-emptied` — The source revision will not be abandoned +* `-k`, `--keep-emptied` — The source revision will not be abandoned