Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: move: Add -f/-t for --from/--to to jj move #3062

Merged
merged 1 commit into from
Feb 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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