From 4f2b05fd095adbac32fa22951987423f2492066e Mon Sep 17 00:00:00 2001 From: Matt Stark Date: Wed, 3 Jul 2024 11:54:36 +1000 Subject: [PATCH] feat(rebase): Rename --skip-empty to --skip-emptied. This is based on @martinvonz's comment in #3830 about the inconsistency between squash --keep-emptied and rebase --skip-empty. --- CHANGELOG.md | 193 +++++++++++++++++-------------- cli/src/commands/rebase.rs | 82 +++++++------ cli/tests/cli-reference@.md.snap | 3 +- cli/tests/test_rebase_command.rs | 4 +- 4 files changed, 155 insertions(+), 127 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f12d377feb..9fce87fda6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,8 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +and this project adheres +to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] @@ -25,9 +26,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 move` to ensure that the target branch already exists. [#3584](https://github.com/martinvonz/jj/issues/3584) +* `jj rebase --skip-empty` has been renamed to `jj rebase --skip-emptied` + ### Deprecations -* Replacing `-l` shorthand for `--limit` with `-n` in `jj log`, `jj op log` and `jj obslog`. +* Replacing `-l` shorthand for `--limit` with `-n` in `jj log`, `jj op log` + and `jj obslog`. * `jj split --siblings` is deprecated in favor of `jj split --parallel` (to match `jj parallelize`). @@ -87,7 +91,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 to-be-pushed commit has conflicts, or has no description / committer / author set. [#3029](https://github.com/martinvonz/jj/issues/3029) -* `jj` will look for divergent changes outside the short prefix set even if it finds the change id inside the short prefix set. [#2476](https://github.com/martinvonz/jj/issues/2476) +* `jj` will look for divergent changes outside the short prefix set even if it + finds the change id inside the short prefix + set. [#2476](https://github.com/martinvonz/jj/issues/2476) ## [0.18.0] - 2024-06-05 @@ -120,7 +126,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 were global flags and specifying them once would insert the new commit before/ after all the specified commits. - ### Deprecations * Attempting to alias a built-in command now gives a warning, rather than being @@ -134,7 +139,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Conflict markers now include an explanation of what each part of the conflict represents. -* `ui.color = "debug"` prints active labels alongside the regular colored output. +* `ui.color = "debug"` prints active labels alongside the regular colored + output. * `jj branch track` now show conflicts if there are some. @@ -176,12 +182,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 fetch` works, `jj` does not suffer from the same problems as Git's `git push --force-with-lease` in situations when `git fetch` is run in the background. -* When the working copy commit becomes immutable, a new one is automatically created +* When the working copy commit becomes immutable, a new one is automatically + created on top of it to avoid letting the user edit the immutable one. * `jj config list` now properly escapes TOML keys (#1322). -* Files with conflicts are now checked out as executable if all sides of the +* Files with conflicts are now checked out as executable if all sides of the conflict are executable. * The progress bar (visible when using e.g. `jj git clone`) clears the @@ -220,19 +227,20 @@ Thanks to the people who made this release happen! ### Fixed bugs -* `jj status` no longer scans through the entire history to look for ancestors with conflicts. +* `jj status` no longer scans through the entire history to look for ancestors + with conflicts. ## [0.17.0] - 2024-05-01 ### Breaking changes * The default template aliases were replaced as follows: - * `builtin_op_log_root(op_id: OperationId)` -> - `format_root_operation(root: Operation)` - * `builtin_log_root(change_id: ChangeId, commit_id: CommitId)` -> - `format_root_commit(root: Commit)` - * `builtin_change_id_with_hidden_and_divergent_info` -> - `format_short_change_id_with_hidden_and_divergent_info(commit: Commit)` + * `builtin_op_log_root(op_id: OperationId)` -> + `format_root_operation(root: Operation)` + * `builtin_log_root(change_id: ChangeId, commit_id: CommitId)` -> + `format_root_commit(root: Commit)` + * `builtin_change_id_with_hidden_and_divergent_info` -> + `format_short_change_id_with_hidden_and_divergent_info(commit: Commit)` * The `--revision` option of `jj rebase` is renamed to `--revisions`. The short alias `-r` is still supported. @@ -279,7 +287,7 @@ Thanks to the people who made this release happen! `jj debug watchman status` command. * `jj rebase` now accepts revsets resolving to multiple revisions with the - `--revisions`/`-r` option. + `--revisions`/`-r` option. * `jj rebase -r` now accepts `--insert-after` and `--insert-before` options to customize the location of the rebased revisions. @@ -327,7 +335,6 @@ Thanks to the people who made this release happen! * Théo Daron (@tdaron) * Yuya Nishihara (@yuja) - ## [0.16.0] - 2024-04-03 ### Deprecations @@ -345,18 +352,20 @@ Thanks to the people who made this release happen! * The `jj sparse` subcommands now parse and print patterns as workspace-relative paths. -* The `jj log` command no longer uses the default revset when a path is specified. +* The `jj log` command no longer uses the default revset when a path is + specified. ### New features -* Config now supports rgb hex colors (in the form `#rrggbb`) wherever existing color names are supported. +* Config now supports rgb hex colors (in the form `#rrggbb`) wherever existing + color names are supported. * `ui.default-command` now accepts multiple string arguments, for more complex default `jj` commands. * Graph node symbols are now configurable via templates - * `templates.log_node` - * `templates.op_log_node` + * `templates.log_node` + * `templates.op_log_node` * `jj log` now includes synthetic nodes in the graph where some revisions were elided. @@ -375,7 +384,8 @@ Thanks to the people who made this release happen! * `jj git push` now prints messages from the remote. -* `jj branch list` now supports a `--conflicted/-c` option to show only conflicted branches. +* `jj branch list` now supports a `--conflicted/-c` option to show only + conflicted branches. * `jj duplicate` and `jj abandon` can now take more than a single `-r` argument, for consistency with other commands. @@ -389,7 +399,8 @@ Thanks to the people who made this release happen! * `jj split` now supports a `--siblings/-s` option that splits the target revision into siblings with the same parents and children. -* New function `working_copies()` for revsets to show the working copy commits of all workspaces. +* New function `working_copies()` for revsets to show the working copy commits + of all workspaces. ### Fixed bugs @@ -421,7 +432,6 @@ Thanks to the people who made this release happen! * TrashCan (@TrashCan69420) * Yuya Nishihara (@yuja) - ## [0.15.1] - 2024-03-06 No code changes (fixing Rust `Cargo.toml` stuff). @@ -457,8 +467,8 @@ No code changes (fixing Rust `Cargo.toml` stuff). commits when they are created. This comes with out-of-the-box support for the following backends: - * GnuPG - * SSH + * GnuPG + * SSH Signature verification and an explicit sign command will hopefully come soon. @@ -496,15 +506,17 @@ No code changes (fixing Rust `Cargo.toml` stuff). * `jj git init --colocate` can now import an existing Git repository. This is equivalent to `jj git init --git-repo=.`. -* `jj git fetch` now automatically prints new remote branches and tags by default. +* `jj git fetch` now automatically prints new remote branches and tags by + default. -* `--verbose/-v` is now `--debug` (no short option since it's not intended to be used often) +* `--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` * `jj commit`/`diffedit`/`move`/`resolve`/`split`/`squash`/`unsquash` now accept `--tool=` option to override the default. - [#2575](https://github.com/martinvonz/jj/issues/2575) + [#2575](https://github.com/martinvonz/jj/issues/2575) * Added completions for [Nushell](https://nushell.sh) to `jj util completion` @@ -520,8 +532,10 @@ No code changes (fixing Rust `Cargo.toml` stuff). ### Fixed bugs -* On Windows, symlinks in the repo are now supported when Developer Mode is enabled. - When symlink support is unavailable, they will be materialized as regular files in the +* On Windows, symlinks in the repo are now supported when Developer Mode is + enabled. + When symlink support is unavailable, they will be materialized as regular + files in the working copy (instead of resulting in a crash). [#2](https://github.com/martinvonz/jj/issues/2) @@ -558,7 +572,6 @@ Thanks to the people who made this release happen! * Vladimir (@0xdeafbeef) * Yuya Nishihara (@yuja) - ## [0.14.0] - 2024-02-07 ### Deprecations @@ -587,12 +600,12 @@ Thanks to the people who made this release happen! **Deadline**: `jj checkout` and `jj merge` will be deleted and are expected become a **hard error later in 2024**. -* `jj init --git` and `jj init --git-repo` are now deprecated and will be removed +* `jj init --git` and `jj init --git-repo` are now deprecated and will be + removed in the near future. Use `jj git init` instead. - ### Breaking changes * (Minor) Diff summaries (e.g. `jj diff -s`) now use `D` for "Deleted" instead @@ -620,7 +633,8 @@ Thanks to the people who made this release happen! * `jj util gc` now removes unreachable operation, view, and Git objects. -* `jj branch rename` will now warn if the renamed branch has a remote branch, since +* `jj branch rename` will now warn if the renamed branch has a remote branch, + since those will have to be manually renamed outside of `jj`. * `jj git push` gained a `--tracked` option, to push all the tracked branches. @@ -684,7 +698,6 @@ Thanks to the people who made this release happen! * vwkd (@vwkd) * Yuya Nishihara (@yuja) - ## [0.13.0] - 2024-01-03 ### Breaking changes @@ -718,7 +731,6 @@ Thanks to the people who made this release happen! * Waleed Khan (@arxanas) * Yuya Nishihara (@yuja) - ## [0.12.0] - 2023-12-05 ### Breaking changes @@ -779,7 +791,6 @@ Thanks to the people who made this release happen! * Waleed Khan (@arxanas) * Yuya Nishihara (@yuja) - ## [0.11.0] - 2023-11-01 ### Breaking changes @@ -803,9 +814,9 @@ Thanks to the people who made this release happen! `git.auto-local-branch` setting is applied only to newly fetched remote branches. Existing remote branches are migrated as follows: - * If local branch exists, the corresponding remote branches are considered - tracking branches. - * Otherwise, the remote branches are non-tracking branches. + * If local branch exists, the corresponding remote branches are considered + tracking branches. + * Otherwise, the remote branches are non-tracking branches. If the deduced tracking flags are wrong, use `jj branch track`/`untrack` commands to fix them up. @@ -827,7 +838,8 @@ Thanks to the people who made this release happen! ### New features -* `jj`'s stable release can now be installed with [`cargo binstall jj-cli`](https://github.com/cargo-bins/cargo-binstall). +* `jj`'s stable release can now be installed + with [`cargo binstall jj-cli`](https://github.com/cargo-bins/cargo-binstall). * `jj workspace add` now takes a `--revision` argument. @@ -880,14 +892,15 @@ Thanks to the people who made this release happen! * Waleed Khan (@arxanas) * Yuya Nishihara (@yuja) - ## [0.10.0] - 2023-10-04 ### Breaking changes -* A default revset-alias function `trunk()` now exists. If you previously defined +* A default revset-alias function `trunk()` now exists. If you previously + defined your own `trunk()` alias it will continue to overwrite the built-in one. - Check [revsets.toml](cli/src/config/revsets.toml) and [revsets.md](docs/revsets.md) + Check [revsets.toml](cli/src/config/revsets.toml) + and [revsets.md](docs/revsets.md) to understand how the function can be adapted. ### New features @@ -943,7 +956,6 @@ Thanks to the people who made this release happen! * Yuya Nishihara (@yuja) * Zachary Dremann (@Dr-Emann) - ## [0.9.0] - 2023-09-06 ### Breaking changes @@ -968,7 +980,8 @@ Thanks to the people who made this release happen! * The default editor on Windows is now `Notepad` instead of `pico`. -* `jj` will fail attempts to snapshot new files larger than 1MiB by default. This behavior +* `jj` will fail attempts to snapshot new files larger than 1MiB by default. + This behavior can be customized with the `snapshot.max-new-file-size` config option. * Author and committer signatures now use empty strings to represent unset @@ -1010,7 +1023,8 @@ Thanks to the people who made this release happen! * `jj init --git-repo` now works with bare repositories. * `jj config edit --user` and `jj config set --user` will now pick a default - config location if no existing file is found, potentially creating parent directories. + config location if no existing file is found, potentially creating parent + directories. * `jj log` output is now topologically grouped. [#242](https://github.com/martinvonz/jj/issues/242) @@ -1051,7 +1065,8 @@ Thanks to the people who made this release happen! selects the branch named "main", but not "maint". `description(exact:"")` selects commits whose description is empty. -* Revsets gained a new function `mine()` that aliases `author(exact:"your_email")`. +* Revsets gained a new function `mine()` that + aliases `author(exact:"your_email")`. * Added support for `::` and `..` revset operators with both left and right operands omitted. These expressions are equivalent to `all()` and `~root()` @@ -1059,7 +1074,8 @@ Thanks to the people who made this release happen! * `jj log` timestamp format now accepts `.utc()` to convert a timestamp to UTC. -* templates now support additional string methods `.starts_with(x)`, `.ends_with(x)` +* templates now support additional string + methods `.starts_with(x)`, `.ends_with(x)` `.remove_prefix(x)`, `.remove_suffix(x)`, and `.substr(start, end)`. * `jj next` and `jj prev` are added, these allow you to traverse the history @@ -1068,7 +1084,8 @@ Thanks to the people who made this release happen! further pending improvements. * `jj diff --stat` has been implemented. It shows a histogram of the changes, - same as `git diff --stat`. Fixes [#2066](https://github.com/martinvonz/jj/issues/2066) + same as `git diff --stat`. + Fixes [#2066](https://github.com/martinvonz/jj/issues/2066) * `jj git fetch --all-remotes` has been implemented. It fetches all remotes instead of just the default remote @@ -1078,7 +1095,8 @@ Thanks to the people who made this release happen! * Fix issues related to .gitignore handling of untracked directories [#2051](https://github.com/martinvonz/jj/issues/2051). -* `jj config set --user` and `jj config edit --user` can now be used outside of any repository. +* `jj config set --user` and `jj config edit --user` can now be used outside of + any repository. * SSH authentication could hang when ssh-agent couldn't be reached [#1970](https://github.com/martinvonz/jj/issues/1970) @@ -1120,7 +1138,6 @@ Thanks to the people who made this release happen! * Yuya Nishihara (@yuja) * Zachary Dremann (@Dr-Emann) - ## [0.8.0] - 2023-07-09 ### Breaking changes @@ -1165,7 +1182,8 @@ Thanks to the people who made this release happen! ### New features -* `jj git push --deleted` will remove all locally deleted branches from the remote. +* `jj git push --deleted` will remove all locally deleted branches from the + remote. * `jj restore` without `--from` works correctly even if `@` is a merge commit. @@ -1321,7 +1339,6 @@ Thanks to the people who made this release happen! * Waleed Khan (@arxanas) * Yuya Nishihara (@yuja) - ## [0.7.0] - 2023-02-16 ### Breaking changes @@ -1505,7 +1522,8 @@ Thanks to the people who made this release happen! * `jj undo` now works after `jj duplicate`. * `jj duplicate` followed by `jj rebase` of a tree containing both the original - and duplicate commit no longer crashes. The fix should also resolve any remaining + and duplicate commit no longer crashes. The fix should also resolve any + remaining instances of https://github.com/martinvonz/jj/issues/27. * Fix the output of `jj debug completion --help` by reversing fish and zsh text. @@ -1517,25 +1535,25 @@ Thanks to the people who made this release happen! Thanks to the people who made this release happen! - * Aleksandr Mikhailov (@AM5800) - * Augie Fackler (@durin42) - * Benjamin Saunders (@Ralith) - * Daniel Ploch (@torquestomp) - * Danny Hooper (@hooper) - * David Barnett (@dbarnett) - * Glen Choo (@chooglen) - * Herby Gillot (@herbygillot) - * Ilya Grigoriev (@ilyagr) - * Luke Granger-Brown (@lukegb) - * Martin von Zweigbergk (@martinvonz) - * Michael Forster (@MForster) - * Philip Metzger (@PhilipMetzger) - * Ruben Slabbert (@rslabbert) - * Samuel Tardieu (@samueltardieu) - * Tal Pressman (@talpr) - * Vamsi Avula (@avamsi) - * Waleed Khan (@arxanas) - * Yuya Nishihara (@yuja) +* Aleksandr Mikhailov (@AM5800) +* Augie Fackler (@durin42) +* Benjamin Saunders (@Ralith) +* Daniel Ploch (@torquestomp) +* Danny Hooper (@hooper) +* David Barnett (@dbarnett) +* Glen Choo (@chooglen) +* Herby Gillot (@herbygillot) +* Ilya Grigoriev (@ilyagr) +* Luke Granger-Brown (@lukegb) +* Martin von Zweigbergk (@martinvonz) +* Michael Forster (@MForster) +* Philip Metzger (@PhilipMetzger) +* Ruben Slabbert (@rslabbert) +* Samuel Tardieu (@samueltardieu) +* Tal Pressman (@talpr) +* Vamsi Avula (@avamsi) +* Waleed Khan (@arxanas) +* Yuya Nishihara (@yuja) ## [0.6.1] - 2022-12-05 @@ -1660,17 +1678,16 @@ No changes, only changed to a released version of the `thrift` crate dependency. Thanks to the people who made this release happen! - * Martin von Zweigbergk (@martinvonz) - * Benjamin Saunders (@Ralith) - * Yuya Nishihara (@yuja) - * Glen Choo (@chooglen) - * Ilya Grigoriev (@ilyagr) - * Ruben Slabbert (@rslabbert) - * Waleed Khan (@arxanas) - * Sean E. Russell (@xxxserxxx) - * Pranay Sashank (@pranaysashank) - * Luke Granger-Brown (@lukegb) - +* Martin von Zweigbergk (@martinvonz) +* Benjamin Saunders (@Ralith) +* Yuya Nishihara (@yuja) +* Glen Choo (@chooglen) +* Ilya Grigoriev (@ilyagr) +* Ruben Slabbert (@rslabbert) +* Waleed Khan (@arxanas) +* Sean E. Russell (@xxxserxxx) +* Pranay Sashank (@pranaysashank) +* Luke Granger-Brown (@lukegb) ## [0.5.1] - 2022-10-17 @@ -1935,9 +1952,9 @@ No changes, only trying to get the automated build to work. ### Fixed bugs - - Fixed crash when `core.excludesFile` pointed to nonexistent file, and made - leading `~/` in that config expand to `$HOME/` - [#131](https://github.com/martinvonz/jj/issues/131) +- Fixed crash when `core.excludesFile` pointed to nonexistent file, and made + leading `~/` in that config expand to `$HOME/` + [#131](https://github.com/martinvonz/jj/issues/131) ## [0.3.0] - 2022-03-12 diff --git a/cli/src/commands/rebase.rs b/cli/src/commands/rebase.rs index bd92e4feb3..9270f5831a 100644 --- a/cli/src/commands/rebase.rs +++ b/cli/src/commands/rebase.rs @@ -125,8 +125,8 @@ use crate::ui::Ui; /// commit. This is true in general; it is not specific to this command. #[derive(clap::Args, Clone, Debug)] #[command(verbatim_doc_comment)] -#[command(group(ArgGroup::new("to_rebase").args(&["branch", "source", "revisions"])))] -#[command(group(ArgGroup::new("target").args(&["destination", "insert_after", "insert_before"]).multiple(true).required(true)))] +#[command(group(ArgGroup::new("to_rebase").args(& ["branch", "source", "revisions"])))] +#[command(group(ArgGroup::new("target").args(& ["destination", "insert_after", "insert_before"]).multiple(true).required(true)))] pub(crate) struct RebaseArgs { /// Rebase the whole branch relative to destination's ancestors (can be /// repeated) @@ -188,12 +188,16 @@ pub(crate) struct RebaseArgs { )] insert_before: Vec, + /// Deprecated. Use --skip-emptied instead. + #[arg(long, conflicts_with = "revisions")] + skip_empty: bool, + /// If true, when rebasing would produce an empty commit, the commit is /// abandoned. It will not be abandoned if it was already empty before the /// rebase. Will never skip merge commits with multiple non-empty /// parents. #[arg(long, conflicts_with = "revisions")] - skip_empty: bool, + skip_emptied: bool, /// Deprecated. Please prefix the revset with `all:` instead. #[arg(long, short = 'L', hide = true)] @@ -213,8 +217,14 @@ Please use `jj rebase -d 'all:x|y'` instead of `jj rebase --allow-large-revsets )); } + if args.skip_empty { + return Err(user_error( + "--skip-empty is deprecated, and has been renamed to --skip-emptied.", + )); + } + let rebase_options = RebaseOptions { - empty: match args.skip_empty { + empty: match args.skip_emptied { true => EmptyBehaviour::AbandonNewlyEmpty, false => EmptyBehaviour::Keep, }, @@ -869,42 +879,42 @@ fn move_commits( .iter() .map(|(commit_id, commit)| { let new_parents = - // New child of the rebased target commits. - if let Some(new_child_parents) = new_children_parents.get(commit_id) { - new_child_parents.clone() - } - // Commits in the target set should persist only rebased parents from the target - // sets. - else if let Some(target_commit_parents) = - target_commits_internal_parents.get(commit_id) - { - // If the commit does not have any parents in the target set, it is one of the - // commits in the root set, and should be rebased onto the new destination. - if target_commit_parents.is_empty() { - new_parent_ids.clone() - } else { - target_commit_parents.clone() + // New child of the rebased target commits. + if let Some(new_child_parents) = new_children_parents.get(commit_id) { + new_child_parents.clone() } - } - // Commits outside the target set should have references to commits inside the set - // replaced. - else if commit - .parent_ids() - .iter() - .any(|id| target_commits_external_parents.contains_key(id)) - { - let mut new_parents = vec![]; - for parent in commit.parent_ids() { - if let Some(parents) = target_commits_external_parents.get(parent) { - new_parents.extend(parents.iter().cloned()); + // Commits in the target set should persist only rebased parents from the target + // sets. + else if let Some(target_commit_parents) = + target_commits_internal_parents.get(commit_id) + { + // If the commit does not have any parents in the target set, it is one of the + // commits in the root set, and should be rebased onto the new destination. + if target_commit_parents.is_empty() { + new_parent_ids.clone() } else { - new_parents.push(parent.clone()); + target_commit_parents.clone() } } - new_parents - } else { - commit.parent_ids().iter().cloned().collect_vec() - }; + // Commits outside the target set should have references to commits inside the set + // replaced. + else if commit + .parent_ids() + .iter() + .any(|id| target_commits_external_parents.contains_key(id)) + { + let mut new_parents = vec![]; + for parent in commit.parent_ids() { + if let Some(parents) = target_commits_external_parents.get(parent) { + new_parents.extend(parents.iter().cloned()); + } else { + new_parents.push(parent.clone()); + } + } + new_parents + } else { + commit.parent_ids().iter().cloned().collect_vec() + }; (commit_id.clone(), new_parents) }) diff --git a/cli/tests/cli-reference@.md.snap b/cli/tests/cli-reference@.md.snap index a473a5c5f6..aadbb0793a 100644 --- a/cli/tests/cli-reference@.md.snap +++ b/cli/tests/cli-reference@.md.snap @@ -1540,7 +1540,8 @@ commit. This is true in general; it is not specific to this command. * `-B`, `--insert-before ` — The revision(s) to insert before (can be repeated to create a merge commit) Only works with `-r`. -* `--skip-empty` — If true, when rebasing would produce an empty commit, the commit is abandoned. It will not be abandoned if it was already empty before the rebase. Will never skip merge commits with multiple non-empty parents +* `--skip-empty` — Deprecated. Use --skip-emptied instead +* `--skip-emptied` — If true, when rebasing would produce an empty commit, the commit is abandoned. It will not be abandoned if it was already empty before the rebase. Will never skip merge commits with multiple non-empty parents diff --git a/cli/tests/test_rebase_command.rs b/cli/tests/test_rebase_command.rs index b7ae47fbc3..8e4ca1c858 100644 --- a/cli/tests/test_rebase_command.rs +++ b/cli/tests/test_rebase_command.rs @@ -2236,7 +2236,7 @@ fn test_rebase_revisions_after_before() { } #[test] -fn test_rebase_skip_empty() { +fn test_rebase_skip_emptied() { let test_env = TestEnvironment::default(); test_env.jj_cmd_ok(test_env.env_root(), &["git", "init", "repo"]); let repo_path = test_env.env_root().join("repo"); @@ -2259,7 +2259,7 @@ fn test_rebase_skip_empty() { ◉ "###); - let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["rebase", "-d=b", "--skip-empty"]); + let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["rebase", "-d=b", "--skip-emptied"]); insta::assert_snapshot!(stdout, @""); insta::assert_snapshot!(stderr, @r###" Rebased 3 commits