Skip to content

Commit

Permalink
feat(cli): Add -f/-t for --from/--to to jj move
Browse files Browse the repository at this point in the history
  • Loading branch information
poliorcetics committed Feb 18, 2024
1 parent 0fc5005 commit 15dbfb8
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 @@ -55,6 +55,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

* `--verbose/-v` is now `--debug` (no short option since it's not intended to be used often)

* `jj move --from/--to` can now be abbreviated to `jj move -f/-t`

### Fixed bugs

* On Windows, symlinks in the repo are now materialized as regular files in the
Expand Down
4 changes: 2 additions & 2 deletions cli/src/commands/move.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ use crate::ui::Ui;
#[command(group(ArgGroup::new("to_move").args(&["from", "to"]).multiple(true).required(true)))]
pub(crate) struct MoveArgs {
/// Move part of this change into the destination
#[arg(long)]
#[arg(long, short)]
from: Option<RevisionArg>,
/// Move part of the source into this change
#[arg(long)]
#[arg(long, short)]
to: Option<RevisionArg>,
/// Interactively choose which parts to move
#[arg(long, short)]
Expand Down
4 changes: 2 additions & 2 deletions cli/tests/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -1057,8 +1057,8 @@ If the source became empty and both the source and destination had a non-empty d
###### **Options:**
* `--from <FROM>` — Move part of this change into the destination
* `--to <TO>` — Move part of the source into this change
* `-f`, `--from <FROM>` — Move part of this change into the destination
* `-t`, `--to <TO>` — Move part of the source into this change
* `-i`, `--interactive` — Interactively choose which parts to move
Possible values: `true`, `false`
Expand Down

0 comments on commit 15dbfb8

Please sign in to comment.