From f751be1697dfed84ce0760fb4db6cc6bc85ec98e Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Sun, 15 Sep 2024 14:54:34 +0200 Subject: [PATCH] squash: accept -k as a shorthand for --keep-emptied This eases the workflow in which a commit in the middle of the tree is repeatedly squashed into its parent. --- CHANGELOG.md | 2 ++ cli/src/commands/squash.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7535716570..50ef5f51c4d 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 86750ecbe75..a9e2677d422 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, }