Skip to content

Commit

Permalink
squash: accept -k as a shorthand for --keep-emptied
Browse files Browse the repository at this point in the history
This eases the workflow in which a commit in the middle of the tree is
repeatedly squashed into its parent.
  • Loading branch information
samueltardieu committed Sep 15, 2024
1 parent 7ff12ec commit f751be1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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 @@ -82,7 +82,7 @@ pub(crate) struct SquashArgs {
#[arg(conflicts_with_all = ["interactive", "tool"], value_hint = clap::ValueHint::AnyPath)]
paths: Vec<String>,
/// The source revision will not be abandoned
#[arg(long)]
#[arg(long, short)]
keep_emptied: bool,
}

Expand Down

0 comments on commit f751be1

Please sign in to comment.